Why do we need to balance the binary search tree? Justify with example. Create an AVL tree from the data 24, 12, 8, 15, 35, 30, 57, 40, 45, 78. (3+7)
How recursive algorithm use stack to store intermediate results? Illustrate with an example. Convert the infix expression A+B-(C*D/E+F)-G*H into postfix expression using stack. (5+5)
How do you insert and delete a node at kth position of the doubly linked list? Describe the process of implementing stack and queue using linked list. (5+5)
Attempt any eight questions: (8 x 5 = 40)
Sort the numbers 82, 73, 12, 39, 26, 88, 2, 9, 60 and 41 using shell sort. (5)
Why do we need asymptotic notation? Describe about Big oh notation with its curve. (1+4)
Define a queue. Explain about enqueue and dequeue operation in circular queue. (1+4)
Write a program to implement binary search. (5)
Find the MST of following graph using Prim’s algorithm. (5)
Assume you have to store the data {0,1,2,4,5,7} into a hash table of size, with hash function H(x) = x % 5. Apply linear probing and double hashing as collision resolution techniques. (5)
In which case, the position od pivot element in quick sort is always either in first or last position. Create a max heap from the numbers {10, 12, 53, 34, 23, 77, 59, 66, 5, 8}. (2+3)
Evaluate the postfix expression 574-*8/4+ using stack. (5)