Total No. of Questions : 8] SEAT No.
P-9142 [Total No. of Pages : 3
[6179]-269
S.E. (AI&ML)
DATA STRUCTURES & ALGORITHMS
(2019 Pattern) (Semester - III) (218542)
Time : 2½ Hours] [Max. Marks : 70
Instructions to the candidates:
1) Solve Q1 or Q2, Q3 or Q4, Q5 or Q6, Q7 or Q8.
2) Figures to the right indicate full marks.
Q1) a) Enlist applications of stack data structure & Define it as an ADT. [6]
b) Write sudo code for insert & delete operations of linear queue, if
implemented using sequential organization. [8]
c) What is the time complexity of push and pop operations for worst cases.?
[4]
OR
Q2) a) Convert the following infix expressions to prefix and clearly indicate the
content of the stack. [8]
i) (A+B) * C – D * F$C
ii) A$2 * (B + C/D*E)$F
($ for power operation)
b) Write sudo code for underflow and overflow conditions for a circular
queue implement with sequential organization, using rear and front only.
[8]
c) Enlist applications of priority queue. [2]
Q3) a) Construct a binary tree using the following tree traversals. [8]
Pre order * + a – bc / – de – + fgh
Inorder a + b – c * d – e/f + g – h
b) Discuss the importance of inorder threaded binary tree with the help of
example. [8]
c) Discuss the worst-case time complexity of deleting a node from binary
seach tree. [2]
P.T.O.
OR
Q4) a) Contrast between general tree & binary tree convert the given general
tree to binary tree. [9]
b) Discuss all the scenariors of deleting a node from BST with examples
for each. [9]
Q5) a) Enlist applications of graphs and find BFS & DFS stepwise. [8]
b) Construct an AVL for the following data, show balance factor of each
node & type of rotation. [9]
58 69 73 18 12 35 24 45
OR
Q6) a) Write sudo code Kruskal’s algorithm & find MST using the same for the
following graph. [9]
b) Discuss the following data structures using examples. [8]
i) AVL trees
ii) Heap
[6179]-269 2
Q7) a) Create hash table & solve collision using linear probing with replacement.
Table size = 10 hash fn = key % 10
9 45 13 58 13 76 89 15 107 49 [8]
b) Write sudo code to perform following operations on index sequential
file. [9]
i) create records
ii) delete record
iii) display records
OR
Q8) a) Enlist various hashing functions used to create hash table. Discuss any
three with examples. [8]
b) Contrast between logical & physical deletion of records and illustrate it
with the help of example. [9]
[6179]-269 3