MODEL QP
MODEL QP
MODEL QP
3. Use stack to convert the given infix expression to postfix:( a+b) * c + (d+e+f) / g AP 2 2
9. Sort the elements using 77, 49, 25, 12, 33 and 81 using Selection sort. AP 5 2
U
12 State the ADT operations of circular linked list and write routines to 1 14
implement the same.
13 R 2 14
Explain with an example to evaluate an expression using stack.
OR
14 What are circular queues? Write the necessary procedure to insert element R 2 14
and delete elements from Circular Queues using Array Implementation.
Describe the routine for AVL tree insertion. Insert the following elements in
15 U 3 14
the empty tree and balance the tree after each insertion.
2 5 4 6 7 9 8 3 1 10
OR
Using Dijkstra’s shortest path algorithm, find out a least cost path to all other
nodes starting from vertex A.
A B C D E
17 A 0 ∞ ∞ 7 ∞ AP 4 14
B 3 0 4 ∞ ∞
C ∞ ∞ 0 ∞ 6
D ∞ 2 5 0 ∞
E ∞ ∞ ∞ 4 0
OR
18 AP 4 14
Apply quick sort algorithm to show the elements 42, 34, 75, 23, 21, 18, 90,
19 AP 5 14
67, 78. Trace the sorting process of algorithm. Aldo write the pseudo code of
quick sort algorithm.
OR
20 Calculate hash values of keys:1892, 1921, 2007, 3456 using different AP 5 7+7
methods of hashing.
PART – C (1 X 10 = 10)
(Application/Design/Analysis/Evaluation/Creativity/Case Study)
Given a linked list that contains alphabets. The alphabets may in upper case
21 AP 1 10
or lowercase. Create two linked list - one which stores uppercase alphabets
and the other that stores lower case alphabets.
OR
Draw the binary search tree for the following input list 60,
22 AP 3 10
25,75,15,50,66,33,44. Trace an algorithm to delete the nodes 25, 75, 44 from
the tree.