Explain stack as ADT. Describe push and pop operation in stack.
Define linear and circular queue. Write are the limitation of linear queue? How circular queue can used to overcome the limitation of linear queue.
What is hashing? Explain different types of collision resolution techniques with suitable example.
What is recursion? Write an algorithm to solve Tower of Hanoi problem.
Differentiate between internal sorting and external sorting algorithm. Explain insertion sorting algorithm with example.
How graph can be represented using adjacency matrix? Explain Depth first traversal in a graph with suitable example.
A binary tree T has 9 nodes. The inorder and preorder traversals of T yield the following sequence of nodes:
In-order: R Z J T K H N M P
Pre-order: K Z R T J N H P M
Draw the tree T.
OR
Write short notes on:
a. Deterministic and non-deterministic algorithm
b. Divide and conquer algorithm
Attempt any TWO questions
[2x10=20]Describe types of linked list. Write an algorithm to perform following operation in circular linked list:
• Insert node at the beginning of circular linked list.
• Insert node at the end of circular linked list.
• Delete node from the beginning of circular linked list.
• Delete node from the end of circular linked list.
Differentiate between strict binary tree and skewed tree. Explain binary search tree and insertion and deletion operation in BST in detail. Consider following data and construct BST: 14, 11, 12, 19, 15, 22, 13, 8, 33, 7, 9, 20.
What is priority queue? Explain sequential searching algorithm and binary searching algorithm with suitable illustration.