Nov Dec 2022
Nov Dec 2022
8
23
PA-1244 [Total No. of Pages : 3
ic-
[5925]-267
tat
4s
S.E. (Information Technology)
3:3
DATA STRUCTURES & ALGORITHMS
02 91
3:2
(2019 Pattern) (Semester - III) (214443)
0
31
7/0 13
0
Time : 2½ Hours] 2/2 [Max. Marks :70
.23 GP
8
2) Neat diagrams must be drawn wherever necessary.
C
23
3) Figures to the right side indicate marks.
ic-
16
tat
8.2
4s
.24
3:3
Q1) a) Discuss how a two-way stack can be developed using array and write
91
49
3:2
sudo code for Push, Pop and display operations. [9]
30
31
b) Write a code for doubly linked list creation, insert and Display and
01
02
OR
7/0
CE
8
23
stack data structure. 1) A+B*C^D-E/F 2) ((A+B)*C-(D-E))^(F+G)[9]
.23
b) Write a sudo code for Queue implementation using array . Perform ic-
16
tat
the following operations: 1) Queue Full 2) Queue Empty 3) equeue
8.2
4s
4) dqueue [9]
.24
3:3
91
49
3:2
30
31
g–h [9]
GP
OR
.23
Q4) a) What is the use of threaded binary free? Give the node structure required
16
for a threaded binary tree. Write pseudo code to find in-order successor
8.2
P.T.O.
b) Write a pseudo code to implement binary search tree for performing
8
following operations : i) Display - Mirror image ii) Display - Minimum
23
value iii) Display average value iv) Display leaf nodes [8]
ic-
tat
4s
Q5) a) Define Minimum Spanning Tree. Compare Prim’s and Kruskal’s
3:3
02 91
Algorithm. Construct a minimum spanning tree for the given graph
3:2
using Kruskal’s Algorithm. What is the cost of the MST? [9]
0
31
7/0 13
0
4
2/2
B E
.23 GP
5
1
A 1 F
E
2
80
8
6 3
C
23
3 C D
2
ic-
16
tat
8.2
4s
.24
3:3
b) Given the following Adjacency matrix, construct the graph and traverse
91
49
3:2
it in Breadth first order starting at vertex ‘F’. [9]
30
31
01
02
A B C D E F
2/2
GP
7/0
A 0 3 7 2 4 0
CE
80
8
B 3 0 9 0 0 10
23
.23
C 7 9 0 1 0 0
ic-
16
tat
D 2 0 1 0 5 8
8.2
4s
.24
3:3
E 4 0 0 5 0 6
91
49
3:2
F 0 10 0 8 6 0
30
31
01
02
OR
2/2
GP
7/0
Q6) a) Construct an Optimal Binary Search Tree for the following data :
CE
80
N=4, Key Set = {C, E, M}, {p1, p2, p3} = {0.1, 0.2, 0.15},{q0, q1,
.23
q2, q3} = {0.15, 0.05, 0.3, 0.05}. What is the cost of the OBST? [9]
16
b) Define AVL Tree. Illustrate with example the various types of rotations
8.2
[5925]-267 2
Q7) a) Explain with example hash functions? [9]
8
23
b) Write short note on closed hashing and Open addressing. [8]
ic-
OR
tat
4s
Q8) a) Explain chaining with replacement and chaining without replacement
3:3
in hashing? [9]
02 91
3:2
b) Write Comparison of different file organizations (sequential, index
0
31
7/0 13
sequential and Direct Access) [8]
0
2/2
.23 GP
E
80
8
C
23
ic-
16
tat
8.2
4s
.24
3:3
91
49
3:2
30
31
01
02
2/2
GP
7/0
CE
80
8
23
.23
ic-
16
tat
8.2
4s
.24
3:3
91
49
3:2
30
31
01
02
2/2
GP
7/0
CE
80
.23
16
8.2
.24
49
[5925]-267 3