Nov Dec 2022
Nov Dec 2022
Nov Dec 2022
8
23
PA-1193 [Total No. of Pages : 4
ic-
[5925]-215
tat
S.E. (E & TC/Electronics)
5s
DATA STRUCTURES
2:5
02 91
(2019 Pattern) (Semester - III) (204184)
3:3
0
31
Time : 2½ Hours] 1/0 13 [Max. Marks : 70
0
Instructions to the candidates:
2/2
.23 GP
8
C
23
4) Assume suitable data, if necessary.
ic-
16
tat
Q1) a) What is ADT? Explain stack as an ADT. [4]
8.2
5s
b) Write a structure for stack using array. Write PUSH and POP function
.24
2:5
91
for stack using array. [8]
49
3:3
c) Evaluate following postfix expression with the help of stack. [6]
30
31
5 3 + 6 2/*3 5*+
01
02
OR
2/2
GP
Q2) a) What is Queue? Explain insertion and deletion operation in Queue with
1/0
8
23
i) Linear Queue
.23
tat
c) Write C functions for : [6]
8.2
5s
2:5
91
3:3
30
31
Q3) a) Write structure definition for single Linked list. Differentiate between
01
02
20 x9 + 15 x 7 + 10 x5 + 5 x + 50
8.2
OR
.24
49
P.T.O.
Q4) a) Write structure definition for double Linked list. Differentiate between
8
23
array and linked list. [6]
ic-
b) State the limitations of array. Draw and explain double linked list. [5]
tat
5s
c) Write following C functions in circular in SLL. [6]
2:5
i) Insert a node at the end
02 91
3:3
0
ii) Delete all nodes in the list
31
1/0 13
0
2/2
.23 GP
Q5) a) Define binary tree. Explain following terms with suitable examples: [7]
E
i) Root node
80
8
C
23
ii) Left and right sub tree
ic-
16
tat
iii) Depth of tree
8.2
5s
.24
2:5
b) Construct the Binary Search Tree (BST) from the following data: [5]
91
49
3:3
CAR, BAG, MAN, ADD, SAD, FAN, TAN
30
31
OR
CE
80
8
Q6) a) Define the following terms with suitable example with respect to Binary
23
.23
tree: [6]
ic-
16
tat
i) Strictly Binary Tree
8.2
5s
.24
3:3
b) Construct the binary search tree (BST) from the following elements: [6]
01
02
2/2
c) What is AVL tree? Explain all the rotations in AVL tree. Construct AVL
.23
1, 2, 3, 4, 5, 6
.24
[5925]-215
49
2
Q7) a) What do you mean by adjacency matrix and adjacency list? Give the
8
23
adjacency matrix and adjacency list for the graph shown below: [6]
ic-
tat
5s
2:5
02 91
3:3
0
31
1/0 13
0
2/2
.23 GP
E
80
8
C
23
ic-
16
tat
8.2
5s
b) Explain with suitable example, DFS and BFS traversal of a graph. [5]
.24
2:5
91
c) Define with an example: [6]
49
3:3
30
31
i) Undirected Graph
01
02
8
OR
23
.23
Q8) a) Define indegree and outdegree of a vertex in graph. Find the indegree ic-
16
tat
and outdegree of following graph. [6]
8.2
5s
.24
2:5
91
49
3:3
30
31
01
02
2/2
GP
1/0
CE
80
.23
16
8.2
.24
[5925]-215
49
3
b) Find out Minimum Spanning Tree of the following graph (figure 3) using
8
23
Kruskal’s algorithm. [6]
ic-
tat
5s
2:5
02 91
3:3
0
31
1/0 13
0
2/2
.23 GP
E
80
8
C
23
ic-
16
c) Find the shortest path from node ‘a’ to all nodes in the graph shown in
tat
8.2
5s
.24
2:5
91
49
3:3
30
31
01
02
2/2
GP
1/0
CE
80
8
23
.23
ic-
16
tat
8.2
5s
.24
2:5
91
49
3:3
30
31
01
02
2/2
GP
1/0
CE
80
.23
16
8.2
.24
[5925]-215
49