Data Structures and Algorithms Model Question
Section A
Long Answer Questions
Attempt any 2 questions. [2*10=20]
AI is thinking...
1. Differentiate stack with queue? Trace an algorithm for converting infix expression to postfix for the following infix expression.
(A+B)*(C$(D-E)+F)-G
AI is thinking...
2. What are the advantages and disadvantages of linked list over an array? Discuss
algorithms for inserting a node at front position of the linked list and deleting its last item
in singly linked list.
AI is thinking...
3. Define sorting problem. Trace quick sort algorithm for the following given list of data and also discuss about its time complexity.
78 45 23 89 65 12 90 33
AI is thinking...
Section B
Short Answer Questions
Attempt any eight questions. [8 × 5 = 40]
AI is thinking...
4. Define ADT? Explain the benefits of using ADT?
AI is thinking...
5. Why circular queue is advantageous over linear queue? Write algorithm for enqueue and
isfull operation for circular queue.
AI is thinking...
6. Define recursive algorithm. Write recursive TOH algorithm?
AI is thinking...
7. Is hashing better than binary search algorithm? Give reasons. Define any two collision
resolution techniques.
AI is thinking...
8. What is a Binary Search Tree? Write an algorithm for searching an item in a binary
search tree.
AI is thinking...
9. What are the different traversing methods in a binary tree? Explain with a clear example
AI is thinking...
10. What is a circular linked list? How can you traverse all nodes in a singly linked list?
AI is thinking...
11. Trace Prim’s Algorithm to find minimum spanning tree for the following graph.
AI is thinking...
12. Write short notes on: (2 × 2.5 = 5)
a. Analysis of Algorithm
b. Representation of Graph
AI is thinking...