(Weightage : 70%) Note : Question no. 1 is compulsory. Attempt any three questions from the rest. All algorithms should be written nearer to ‘C’ language.
1. (a) Explain the operations that are performed
on Stacks. Write an algorithm to push an element to the stack. 10
(b) What are Arrays ? Write an algorithm to
multiply two matrices. 10
(c) What is Binary Search ? Write an
algorithm for it. 10
(d) Convert the following expression to postfix : 10
(a + b) / (c – d) MCS-208 1 P.T.O. 2. (a) What is a Stack ? Write an algorithm for implementation of a Stack. 10
(b) What is Storage Complexity ? How does it
differ from Time Complexity ? 10
3. (a) What are Singly Linked Lists ? Write an
algorithm for implementation of a Singly Linked List. 10
(b) What is a Binary Tree ? How does it differ
from a tree ? Write an algorithm for traversal of a Binary Tree. 10
4. (a) What are the properties of an AVL tree ?
Explain the possible rotations that are possible on an unbalanced AVL tree. 10
(b) Write Dijkstra’s algorithm. 10
5. (a) What is Breadth First Search ? How does it
differ from Depth First Search ? 10
(b) What is Hashing ? Write a short note on it. 10