Dsa QB
Dsa QB
B C
D E F G
H I
5. Define a binary search tree? With the help of suitable example, explain the insertion and deletion of
an element into binary search tree?
7. Construct a binary search tree from the given values. Consider the first value as the root value.
Values: 45, 23, 29, 85, 92, 7, 11, 35, 49, 51
8. What is an AVL tree? Explain various rotations of AVL trees maintaining balance factor while
insertion and deletion takes place.
8. What is an AVL Tree? How does it differ from a Binary tree?
9. Explain Heap tree in detail.
10. Explain Red-Black trees in detail.
UNIT – IV: Graphs & Searching
3. Write and explain Dijkstra algorithm for finding shortest path. Give an example.
4. Explain topological sorting algorithm for finding shortest path. Give an example.
5. Write and explain linear search procedure or algorithm with a suitable example.
6. Write and explain binary search procedure or algorithm with a suitable example.
9. What is collision? List various collision resolution techniques. Explain any two collision resolution
techniques.
10. Explain in detail about the following collision resolution methods:
(i) Linear probing. (ii) Separate chaining. (iii) Double hashing.
UNIT – V:Sorting
1. What is the best case and worst case time complexity of Quick sort and insertion sort?
2. What is the best case and worst case time complexity of bubble sort and insertion sort?
3. What is the advantage of quick sort? Mention its worst case time complexity.
4. What is heap sort?
5. What is merge sort?
6. What is difference between quick sort and heap sort?
7. Define sorting and its types?
8. What are different types of internal sorting?
9. What is shell sort?
10. What is bubble sort?
Long Answer Questions [10 Marks]
1. Illustrate the working of merge sort with an example. Calculate the time complexity in worst and best cases.
8. State and explain algorithm to perform Heap sort? Sort the following numbers using heap sort: 47, 32, 15, 38,
55, 17, 25, 45, 42 and 50.
9. What is meant by sorting? Write an algorithm for insertion sort and illustrate with an example?