Dsa Jun 2022
Dsa Jun 2022
:
P649 [5869]-277
[Total No. of Pages : 3
:56
S.E. (Computer Engineering)
:27
DATA STRUCTURES AND ALGORITHMS
08
(2019 Pattern) (Semester - II)
1
22
23 87
Time : 2½ Hours] [Max. Marks : 70
/20
3
Instructions to the candidates:
/06
4.1 01
1) Answer Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6, Q.7 or Q.8.
2) Neat diagrams must be drawn wherever necessary.
.18 GP
41
3) Figures to the right indicate full marks.
4) Assume suitable data, if necessary.
3.1 CE
67
:56
Q1) a) Draw any directed graph with minimum 6 nodes and represent graph
using adjacency matrix, adjacency list and adjacency multi list. [6]
:27
10
08
71
b) Consider the graph represented by the following adjacency matrix : [6]
22
/20
1 2 3 4 5 6
38
1 0 6 1 5 0 0
/06
01
2 6 0 5 0 3 0
23
GP
3 1 5 0 5 6 4
41
4.1
4 5 0 5 0 0 2
CE
5 0 3 6 0 0 6
.18
6 0 0 4 2 6 0
67
:56
3.1
:27
10
OR
GP
41
4.1
Q2) a) Write non-recursive pseudo for Depth First Search (DFS). [6]
CE
.18
67
b) Consider the given graph and find the shortest path by using Dijkstra’s
3.1
P.T.O.
:56
:27
08
1
22
23 87
/20
c) Show BFS and DFS for the following graph with starting vertex as 1.
3
/06
Explain with proper steps. [6]
4.1 01
.18 GP
41
3.1 CE
67
:56
:27
10
08
71
Q3) a) Explain with example 22 [6]
i) Red - Black Tree
/20
38
1, 2, 3, 4, 8, 7, 6, 5, 11, 10
4.1
CE
.18
:56
3.1
:27
OR
10
08
71
22
i) AA tree
.18
[5869]-277 2
Q5) a) Construct B tree of order 5 for the following data: [6]
78, 21, 14, 11, 97, 85, 74, 63, 45, 42, 57
:56
b) Explain B+ tree delection with example. [6]
:27
c) What is B+ tree? Give structure of it’s internal note. What is the difference
08
between B and B+ tree. [6]
1
22
23 87
/20
3 OR
/06
4.1 01
.18 GP
data:
3.1 CE
F, S, Q, K, C, L, H, T, V, W, M, R [6]
b) Write an algorithm of B tree deletion. [6]
67
:56
c) Explain with example trie.tree. Give advantage and applications of trie
:27
tree. [6]
10
08
71
22
/20
38
Q7) a) Define sequential file organization. Give it’s advantages and disadvantages.
/06
[6]
01
23
b) What is file? List different file opening modes in C++. Explain concept
GP
OR :56
3.1
:27
10
Q8) a) A write a C++ program to create a file. Insert records into the file by
08
opening file in append mode. Search for a specific record into file. [6]
71
22
b) Sort the following elements using two way merge sort with m = 3.
/20
38
20, 47, 15, 8, 9, 4, 40, 30, 12, 17, 11, 56, 28, 35 [6]
/06
01
file. [5]
41
4.1
CE
.18
67
3.1
10
[5869]-277 3