Be - Computer Engineering - Semester 4 - 2022 - May - Data Structures and Algorithms Dsa Pattern 2019
Be - Computer Engineering - Semester 4 - 2022 - May - Data Structures and Algorithms Dsa Pattern 2019
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
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
6:4
91
49
8: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
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
1, 2, 3, 4, 8, 7, 6, 5, 11, 10
CE
82
8
23
.23
tat
8.2
7s
OR
.24
6:4
91
49
8:2
i) AA tree
.23
[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
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
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
file. [5]
3/0
CE
82
.23
16
8.2
.24
[5869]-277 3
49