Total No. of Questions : 8] SEAT No.
8
23
P-9700 [Total No. of Pages : 4
ic-
[6179]-229A
tat
9s
S.E. (E & TC/Electronics)
4:1
DATA STRUCTURES
02 91
1:4
(2019 Pattern) (Semester - III) (204184)
0
41
Time : 2½ Hours]
5/0 13 [Max. Marks : 70
0
Instructions to the candidates:
1/2
.23 GP
1) Answer Q1 or Q2, Q3 or Q4, Q5 or Q6 and Q7 or Q8.
2) Figures to the right indicate full marks.
E
80
8
3) Assume suitable data, if necessary.
C
23
4) Neat diagrams must be drawn wherever necessary.
ic-
16
tat
Q1) a) Write a ‘C’ function to Push and POP elements from a stack of characters
8.2
9s
using an array. [6]
.24
4:1
91
49
b) What are the disadvantages of the linear queue? Suggest a suitable method
1:4
30
to overcome them. [6]
41
01
02
c) Convert the given infix expression to a postfix expression using stack :
1/2
(a^b)*c–d/d [5]
GP
5/0
Note : ^=Exponent operator.
CE
80
8
23
OR
.23
ic-
16
tat
Q2) a) Identify the expression and convert them into the remaining two forms :
8.2
9s
[6]
.24
4:1
91
49
1:4
i) AB + C * DE – FG + + $
30
41
ii) – A / B * C $ DE
01
02
1/2
Note $ = Exponent operator
GP
5/0
b) Write a ‘C’ function to insert and delete element from queue using an
CE
80
array. [6]
.23
c) Define Queue. What are conditions for ‘Queue empty’ and ‘Queue full’
16
when queue is implemented using Array? Explain. [5]
8.2
.24
49
P.T.O.
Q3) a Explain traversal operations in a singly linked list. [6]
8
23
b) A doubly linked list with numbers to be created. Write node structure and
ic-
a ‘C’ function to create a double linked list. [6]
tat
c) Draw and explain the circular linked list. State the limitations of a singly
9s
linked list. [6]
4:1
02 91
OR
1:4
Q4) a) Write limitations of arrays over linked list? Represent the following
0
41
5/0 13
polynomial using a singly linked list. [6]
23x9 + 18x7 + 41x6 +16x4 + 3
0
1/2
.23 GP
b) What is a singly linked list? Write C function for inserting a node at a given
location into a singly linked list. [6]
E
80
8
C
c) Write a’C’ function for Inserting a number at the front of the circular
23
linked list. [6]
ic-
16
tat
8.2
9s
Q5) a) Write are cursive ‘C’ function for inorder and preorder traversal of Binary
.24
4:1
Search Tree. [6]
91
49
1:4
b) Explain with suitable example how binary tree can be represented using :
30
41
i) Array
01
02
ii) Linked List
1/2
GP
[6]
5/0
c) Write an algorithm to insert an element in a binary search tree implemented
CE
80
8
using linked representation. [5]
23
.23
OR
ic-
16
tat
Q6) a) Construct the Binary Search Tree (BST) from the following data : [6]
8.2
9s
5, 2, 8, 4, 1, 9, 7
.24
4:1
Also show preorder, postorder and inorder traversal for the same.
91
49
1:4
b) Explain basic concept of AVL tree. Also explain four rotations in AVL tree.
30
41
[6]
01
02
c) Define the following terms with respect to Trees : [5]
1/2
GP
i) Root
5/0
ii) Subtree
CE
80
iii) Level of node
.23
iv) Depth of Tree
16
v) Siblings
8.2
.24
49
[6179]-229A 2
Q7) a) Represent the following graph using the adjacency matrix and adjacency
8
23
list. [6]
ic-
tat
9s
4:1
02 91
1:4
0
41
5/0 13
Fig. 1
0
1/2
.23 GP
b) Define indegree and outdegree of a vertex in graph. Find the indegree
and outdegree of following graph. [6]
E
80
8
C
23
ic-
16
tat
8.2
9s
.24
4:1
91
49
1:4
30
41
01
02
Fig. 2
1/2
GP
c) Define with an examples : [6]
5/0
i) Undirected Graph
CE
80
8
23
ii) Directed Graph
.23
iii) Weighted Graph
ic-
16
tat
OR
8.2
9s
.24
Q8) a) Find out Minimum spanning Tree of the following graph (figure 3) using
4:1
91
Kruskal’s algorithm. [6]
49
1:4
30
41
01
02
1/2
GP
5/0
CE
80
.23
16
Fig. 3
8.2
b) Explain with suitable example, DFS and BFS traversal of a graph. [6]
.24
49
[6179]-229A 3
c)
49
[6179]-229A
.24
8.2
16
C E
.23 GP
80 0
5/0 13
49 1/2 0
02 91
.24
8.2 CE 41
16 1:4
.23 GP 4:1
4
80 9s
fig. 4 using Dijkstra’s algorithm.
5/0
01 Fig. 4
tat
30 ic-
49 1/2 23
.24 02
41
91 8
8.2 CE
16 1:4
.23 GP 4:1
80 01 9s
5/0 30 tat
1/2 ic-
23
02
41
91 8
1:4
4:1
9s
tat
[6]
Find the shortest path from node ‘a’ to all nodes in the graph shown in
ic-
23
8