Answer any one question from Q1 and Q2
1 (a)
Explain the concept of implicit and explicit stack.
2 M
1 (b)
Write an algorithm to convert infix to postfix expression.
4 M
1 (c)
Consider following circular queue of characters and size 5.
Front point to A and Rear Points to C Show the queue contents as per the following operations at every step.
i) F is added to the queue.
ii) Two letters are deleted.
Iii) K, L, M are added to the queue.
iv) Two letters are deleted.
v) R is added to the queue.
vi) Two letters are deleted.
vii) R is added to the queue.
viii) Two letters are deleted
1 | 2 | 3 | 4 | 5 | |||||
|
Front point to A and Rear Points to C Show the queue contents as per the following operations at every step.
i) F is added to the queue.
ii) Two letters are deleted.
Iii) K, L, M are added to the queue.
iv) Two letters are deleted.
v) R is added to the queue.
vi) Two letters are deleted.
vii) R is added to the queue.
viii) Two letters are deleted
6 M
2 (a)
Implement Queue as an ADT using array representation.
6 M
2 (b)
Clearly indicate the contents of stack during conversion of given infix expression to prefix expression. Consider ^ as exponent operator.
(((A+B)*C-(D-E))^(F+G))
(((A+B)*C-(D-E))^(F+G))
6 M
Answer any one question from Q3 and Q4
3 (a)
For Given graph draw the adjacency list / matrix and perform BFS or DFS.
6 M
3 (b)
With Example define following terms:
i) Complete Binary tree
ii) Strictly Binary tree
iii) Predecessor and successor
i) Complete Binary tree
ii) Strictly Binary tree
iii) Predecessor and successor
6 M
4 (a)
Write a pseudo code for Prim's algorithm and find the MST for the graph given and show all the steps.
8 M
4 (b)
For the binary tree representation as an array, perform in-order threading for the tree.
A B C D E G H -- -- F -- -- -- J K -- -- -- -- -- -- -- -- -- -- -- -- L -- --
A B C D E G H -- -- F -- -- -- J K -- -- -- -- -- -- -- -- -- -- -- -- L -- --
4 M
Answer any one question from Q5 and Q6
5 (a)
Construct an AVL search tree by inserting the following elements in the order of their occurrence. Show the balance factor and type of rotation at each stage:
MAR MAY NOV AUG APR JAN DEC JUL FEB JUN
MAR MAY NOV AUG APR JAN DEC JUL FEB JUN
10 M
5 (b)
Explain Huffman algorithm with an example.
4 M
6 (a)
Sort the following numbers in ascending order using heap sort:
55 33 11 77 44 22 66 88 99
55 33 11 77 44 22 66 88 99
10 M
6 (b)
Write a note on OBST.
4 M
Answer any one question from Q7 and Q8
7 (a)
With the prototype and example, explain following functions:
i) seekg()
ii)tellp()
i) seekg()
ii)tellp()
4 M
7 (b)
Write C++ implementation of all primitive operations on Sequential file.
8 M
8 (a)
What is a File? List different file opening modes? List the different types of external storage devices?
6 M
8 (b)
Compare Sequential, Index sequential and direct access files.
6 M
More question papers from Data Structures & Files