DDS (2021W)
DDS (2021W)
Q.1 Short Questions. (All are compulsory) (Each of one mark) (15)
1. Define data structure.
2. Define: Height of a tree.
3. Give two applications of graphs.
4. What is the complexity of binary search algorithm?
5. List operations performed on a stack.
6. Write two simple hash functions.
7. What is hash collision?
8. Write ‘C’ structure of Singly linked list.
9. What is Recursion?
10. What is Time complexity of an algorithm?
11. Define Circular linked list.
12. Define 2-3 tree.
13. A graph containing only isolated nodes is called a ___________.
14. What is the reverse polish notation for infix expression a / b *c ?
15. What is common in inorder, preorder and postorder traversal?
Q.2 Answer the following questions. (Attempt any three) (15)
A) Explain AVL trees.
B) Write a pseudo-code for PUSH and POP operations of stack.
C) Differentiate between arrays and linked list.
D) Perform following operations in a circular queue of length 4 and give the Front, Rear and Size of
the queue after each operation.
1) Insert A, B
2) Insert C
3) Delete
4) Insert D
5) Insert E
6) Insert F
7) Delete
Q.3 A) Explain the structure of indexed sequential file. (07)
B) Write Kruskal’s algorithm for minimum spanning tree with an example. (08)
OR
B) Write Prim’s algorithm for minimum spanning tree with an example. (08)
Q.4 A) Explain the trace of selection sort on following data. (07)
26,54,93,17,77,31,44,55,20
OR
A) Explain the trace of bubble sort on following data. (07)
26,54,93,17,77,31,44,55,20
B) Explain Depth First Search and Breadth First Search in graphs with an example. (08)
Page 1 of 1