Professional Documents
Culture Documents
1. (a) What do you mean by complexity of an algorithm? What are meant by best 1+2
case, worst case and average case complexity? What are the complexity of
binary search algorithm?
(b) We use a stack to evaluate postfix expressions. Below is an expression 3
consisting of 9 tokens. Show the contents of the stack after each token is
processed.
A B + D * E F - ^
(d) What is recursive procedure? What is quick sort write an algorithm for quick 4
sort using a suitable example?
2. (a) What is Eight-queen problem? What is the algorithm used to solve Eight- 1+2
queen problem?
(b) Define almost complete binary tree. How do you traverse a binary tree? 1+2
(c) Consider the following Binary Search Tree 2+2
60
25 75
15 50 66
33
44
(i) Delete a node with value 44
(ii) After performing (i) insert a node with value 35.