Nov Dec 2023
Nov Dec 2023
8
23
P9111 [Total No. of Pages : 4
ic-
[6179]-236
tat
S.E. (Computer Engineering) (Artificial Intelligence & Data
2s
Science Engineering)
0:3
DATA STRUCTURES AND ALGORITHMS
02 91
9:4
(2019 Pattern) (Semester - IV) (210252)
0
30
Time : 2½ Hours] 1/1 13 [Max. Marks : 70
Instructions to the candidates:
0
2/2
1) Answer to the questions Q.No.1 or Q.No.2, Q.No.3 or Q.No.4, Q.No..5 or Q.No.6,
.23 GP
Q.No.7 or Q.No.8.
2) Assume suitable data, if necessary.
E
82
8
3) Draw neat labelled diagrams wherever necessary.
C
23
4) Figures to the right indicate full marks.
ic-
16
tat
Q1) a) Write Floyd Warshall Algorithm. [6]
8.2
2s
b) Construct stepwise minimum spanning tree (MST) for the given graph
.24
0:3
using Prim’s Algorithm. Also calculate sum of all weights. Start from
91
49
9:4
vertex 1. [6]
30
30
01
02
2/2
GP
1/1
CE
82
8
23
.23
ic-
16
tat
c) Apply Dijkstra’s Algorithm for the graph given below, and find the shortest
8.2
2s
0:3
91
49
9:4
30
30
01
02
2/2
GP
1/1
CE
82
.23
16
OR
8.2
.24
P.T.O.
49
[6179]-236 1
Q2) a) Define indegree & outdegree of a directed graph. Write degree for G1 &
8
23
G2. Write indegree & outdegree of each vertex for G3 graph. [6]
ic-
tat
2s
0:3
02 91
9:4
0
30
1/1 13
0
2/2
.23 GP
E
82
8
C
23
ic-
b) Construct the minimum spanning tree (MST) for the given graph using
16
tat
Kruskal’s Algorithm. [6]
8.2
2s
.24
0:3
91
49
9:4
30
30
01
02
2/2
GP
1/1
CE
82
c) Find the number of different topological orderings possible for the given
8
23
graph. [6]
.23
ic-
16
tat
8.2
2s
.24
0:3
91
49
9:4
30
30
01
02
2/2
GP
1/1
CE
82
[6179]-236 2
b) Draw splay tree after [6]
8
23
ic-
i) Zig rotation
tat
ii) Zag rotation for follwoing tree-
2s
0:3
02 91
9:4
0
30
1/1 13
0
2/2
.23 GP
8
C
23
ic-
16
tat
8.2
2s
.24
0:3
91
49
9:4
30
30
(3, 6), (17, 15), (13, 15), (6, 12), (9, 1) (2,7), (10, 19).
2/2
GP
OR
CE
82
8
23
Q4) a) Construct AVL tree for insertion of following data: [6]
.23
tat
b) Define Red Black tree. List its properties. Give example of it. [6]
8.2
2s
c) Write the functions for split & skew operations in AA tree. [6]
.24
0:3
91
49
9:4
30
Q5) a) Create a B- Tree of order 5 from the following list of data items: [9]
30
30, 20, 35, 95, 15, 60, 55, 25, 5, 65, 70, 10, 40, 50, 80, 45
01
02
2/2
i) Primary
CE
82
ii) Secondary
.23
iii) Sparse
16
iv) Dense
8.2
OR
.24
49
[6179]-236 3
Q6) a) Create a B+Tree of order 3 from the following list of data items: [9]
8
23
1, 3, 5, 7, 9, 2, 4, 6, 8, 10
ic-
tat
b) Define trie tree. Compare trie tree with hash table. Draw trie tree for
2s
following data: bear, sell, bell, bid, stock, bull, buy, stop. [8]
0:3
02 91
9:4
Q7) a) Explain sequential & direct access file organization. Also list two
0
30
1/1 13
advantages & disadvantages of same. [9]
0
b) Explain Indexed sequential access file organization. Also list two
2/2
.23 GP
8
C
23
OR
ic-
16
Q8) a) What is linked organization? Explain inverted file and coral rings with
tat
8.2
2s
.24
0:3
b) Explain multilist files & cellular partitions. [8]
91
49
9:4
30
30
01
02
2/2
GP
1/1
CE
82
8
23
.23
ic-
16
tat
8.2
2s
.24
0:3
91
49
9:4
30
30
01
02
2/2
GP
1/1
CE
82
.23
16
8.2
.24
49
[6179]-236 4