Compute the GCO of 30 and 12 using recursion. Convert the infix expression A + B *(C – D) / E to postfix using stack.
Explain circular linked list in brief. Explain process of inserting and removing nodes in a singly linked list.
Explain merge sort along with its time complexity. Trace the execution of Quick sort algorithm with the array of numbers 40, 22, 70, 11, 43, 18, 20, 21 and 8.
Attempt any Eight questions
[8x5=40]Why do we need dynamic memory allocation? Explain abstract data type with example.
What is drawback of linear queue? Explain circular queue.
List any one limitation of recursion. Describe stack as linked list.
Define max and min heap. How can we use heap property in heap sort? Explain.
Write the algorithm of binary search with its time complexity.
Suppose, the set of keys is {5, 10, 12, 8, 47, 56, 7, 48}, m = 10, and h(x) = x mod 10. Show the effect of successively inserting these keys using linear probing.
Create a BST from data 20, 25, 18, 16, 19, 30, 17 and traverse it in inorder, preorder and post order.
How do you represent graphs? Explain.
Write short notes on:
a) Priority queue
b) Minimum spanning tree