Data Structures & Algorithms (DSA) SPPU Endsem Question Paper May 2024
All 8 questions from this SPPU endsem paper, as printed. Read them here or open the PDF.
- Subject code
- 214443
- Pattern
- 2019 pattern
- Exam
- Endsem
- Session
- May 2024
- Max. marks
- 70
- Time
- 2½ Hours
- Semester
- III
- Paper code
- [6261]-61
Printed for: S.E. (I.T.)
Instructions to the candidates
- Answer Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6 and Q.7 or Q.8.
- Neat diagrams must be drawn wherever necessary.
- Figures to the right indicate full marks.
- Assume suitable data, if necessary.
Questions
Q1
- a)[6]
This part has equations that don’t show as text. Open the PDF to read it.
- b)[6]
Clearly indicate the content of stack during conversion of given infix expression to prefix. A^B*C–D+E/F/(G+H)
- c)[6]
Write a C++ pseudocode algorithm for the following operation of simple queue using linked representation. i) enqueue () ii) dequeue() iii) print_Queue() 2
OR- a)
Q2
- a)[6]
This part has equations that don’t show as text. Open the PDF to read it.
- b)[6]
Consider the following circular queue of characters of size 6. “_” denotes an empty queue location. Initial queue configuration is Front = 1, Rear = 3 and having letters as shown below. i) F is added to the queue ii) Two letters are deleted iii) K, L, M are added to the queue iv) R is added to the queue v) Two letters are deleted vi) S is added to the queue vii) Two letters are deleted Show the queue content of queue with Front and Rear as the above options take place.
- c)[6]
What is double ended queue? Mention Types of double ended queue. Explain enqueue and dequeue operations of double ended queue.
- a)
Q3
- a)[6]
This part has equations that don’t show as text. Open the PDF to read it.
- b)[6]
Write the C++ pseudocode algorithm for creating expression tree from postfix expression.
- c)[5]
Construct an inorder threaded binary search tree for the following set of elements. 100, 50, 200, 300, 20, 150, 70, 180, 120, 30 Show all steps.
OR- a)
Q4
- a)[6]
Write C++ pseudocode algorithm for preorder traversal of threaded binary tree.
- b)[6]
This part has equations that don’t show as text. Open the PDF to read it.
- c)[5]
Explain the following terms with respect to tree. i) Root ii) Leaf node iii) Siblings iv) Degree of a node v) Degree of tree
- a)
Q5
- a)[6]
Find the minimum spanning tree using Prim’s algorithm for the following graph.
- b)[7]
Obtain an AVL tree by inserting one data element at a time in the following sequence: 50, 55, 60, 15, 10, 40, 20, 45, 30, 70, 80. Label the rotations appropriately at each stage
- c)[5]
Write short note on OBST
OR- a)
Q6
- a)[6]
Write an application of Topological sorting with suitable example.
- b)[7]
For a given tree, Identify whether it is AVL tree or not? If it is not an AVL tree, convert it into balanced AVL tree. After conversion, insert node 15 in the tree. Delete node 20 from the tree. After insertion and deletion operation, if the tree is imbalanced, make it balanced AVL tree. 4
- c)[5]
Construct Heap to Sort given values in ascending order using MAXheap sort, 5, 3, 17, 10, 84, 19, 22. (Note : Make a use of Heapify)
- a)
Q7
- a)[6]
- b)[6]
Write a pseudo code to perform the following operations on Sequential file : i) Insert record ii) Delete record
- c)[5]
What are the characteristics of good hash function? List different techniques to resolve collision in hash table and explain any one with suitable example.
ORQ8
- a)[6]
Explain the Index sequential file organization with advantages and disadvantage.
- b)[6]
Explain Linear probing with and without replacement with suitable examples.
- c)[5]
What is File? Differentiate between text file and binary file. … … …
- a)