Total No. of Questions : 8] SEAT No.
8
23
P649 [5869]-277
[Total No. of Pages : 3
ic-
S.E. (Computer Engineering)
tat
7s
DATA STRUCTURES AND ALGORITHMS
6:4
(2019 Pattern) (Semester - II)
02 91
8:2
Time : 2½ Hours] [Max. Marks : 70
0
20
3/0 13
Instructions to the candidates:
1) Answer Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6, Q.7 or Q.8.
0
6/2
2) Neat diagrams must be drawn wherever necessary.
.23 GP
3) Figures to the right indicate full marks.
4) Assume suitable data, if necessary.
E
82
8
C
23
ic-
Q1) a) Draw any directed graph with minimum 6 nodes and represent graph
16
tat
using adjacency matrix, adjacency list and adjacency multi list. [6]
8.2
7s
.24
6:4
91
b) Consider the graph represented by the following adjacency matrix : [6]
49
8:2
1 2 3 4 5 6
30
20
1 0 6 1 5 0 0
01
02
2 6 0 5 0 3 0
6/2
GP
3 1 5 0 5 6 4
3/0
4 5 0 5 0 0 2
CE
82
8
23
5 0 3 6 0 0 6
.23
6 0 0 4 2 6 0
ic-
16
tat
8.2
7s
Find minimum spanning tree of this graph using prim’s Algorithm.
.24
6:4
91
49
8:2
c) Write a short note on topological sorting. [6]
30
20
01
02
6/2
OR
GP
3/0
Q2) a) Write non-recursive pseudo for Depth First Search (DFS). [6]
CE
82
.23
b) Consider the given graph and find the shortest path by using Dijkstra’s
16
algorithm. From source to all other nodes. [6]
8.2
.24
49
P.T.O.
8
23
ic-
tat
7s
6:4
02 91
8:2
0
c) Show BFS and DFS for the following graph with starting vertex as 1.
20
3/0 13
Explain with proper steps. [6]
0
6/2
.23 GP
E
82
8
C
23
ic-
16
tat
8.2
7s
.24
6:4
91
Q3) a) Explain with example [6]
49
8:2
i) Red - Black Tree
30
20
ii) Splay Tree
01
02
6/2
GP
b) Construct AVL tree for following sequence of keys. [6]
3/0
1, 2, 3, 4, 8, 7, 6, 5, 11, 10
CE
82
8
23
.23
c) What is OBST in data structure? and what are advantages of OBST?[5]
ic-
16
tat
8.2
7s
OR
.24
6:4
91
49
8:2
Q4) a) Explain the following:
30
20
i) Static and dynamic tree tables with suitable example. [3]
01
02
ii) Dynamic programming with principle of optimality. [3]
6/2
GP
3/0
b) Write short note on: [6]
CE
82
i) AA tree
.23
ii) K - dimensional tree
16
8.2
c) Explain AVL tree rotations with example. [5]
.24
[5869]-277 2
49
8
23
Q5) a) Construct B tree of order 5 for the following data: [6]
ic-
78, 21, 14, 11, 97, 85, 74, 63, 45, 42, 57
tat
b) Explain B+ tree delection with example. [6]
7s
c) What is B+ tree? Give structure of it’s internal note. What is the difference
6:4
between B and B+ tree. [6]
02 91
8:2
0
20
3/0 13 OR
0
6/2
.23 GP
Q6) a) Build B+ tree of order 3 for the following
data:
E
82
8
F, S, Q, K, C, L, H, T, V, W, M, R [6]
C
23
b) Write an algorithm of B tree deletion. [6]
ic-
16
tat
c) Explain with example trie.tree. Give advantage and applications of trie
8.2
7s
tree. [6]
.24
6:4
91
49
8:2
30
Q7) a) Define sequential file organization. Give it’s advantages and disadvantages.
20
[6]
01
02
b) What is file? List different file opening modes in C++. Explain concept
6/2
GP
of inverted files. [6]
3/0
c) Write short note on external sort. [5]
CE
82
8
23
.23
OR ic-
16
tat
8.2
7s
Q8) a) A write a C++ program to create a file. Insert records into the file by
.24
6:4
opening file in append mode. Search for a specific record into file. [6]
91
49
8:2
b) Sort the following elements using two way merge sort with m = 3.
30
20
20, 47, 15, 8, 9, 4, 40, 30, 12, 17, 11, 56, 28, 35 [6]
01
02
c) Explain indexed sequential file organization. Compare it with direct access
6/2
GP
file. [5]
3/0
CE
82
.23
16
8.2
.24
[5869]-277 3
49