You are on page 1of 4

Total No. of Questions : 8] SEAT No.

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

1) Attempt 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.
E
80

3) Figures to the right side indicate full marks.

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

suitable diagram. [6]


CE

b) Explain with example: [6]


80

8
23
i) Linear Queue
.23

ii) Circular Queue ic-


16

tat
c) Write C functions for : [6]
8.2

5s

i) Enqueue in Linear Queue


.24

2:5
91

ii) Dequeue in Circular Queue


49

3:3
30
31

Q3) a) Write structure definition for single Linked list. Differentiate between
01
02

static memory and dynamic memory allocation. [6]


2/2

b) Write following C functions in SLL: [6]


GP
1/0

i) Insert a node at the beginning


CE

ii) Delete a node at the end


80

c) State the limitations of single linked list. Represent following polynomial


.23

using linked list. [5]


16

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

c) Write recursive function for in-order, pre-order and post-order traversal


01
02

of Binary tree. [6]


2/2
GP
1/0

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

ii) Completely Binary Tree


2:5
91
49

3:3

iii) Binary Search Tree


30
31

b) Construct the binary search tree (BST) from the following elements: [6]
01
02
2/2

45, 20, 80, 40, 10, 90, 70


GP
1/0

Also, show pre-order and post-order traversal for the same.


CE
80

c) What is AVL tree? Explain all the rotations in AVL tree. Construct AVL
.23

tree for the following data: [6]


16
8.2

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

ii) Directed Graph


2/2
GP
1/0

iii) Weighted Graph


CE
80

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

fig.4 using Dijkstra’s algorithm. [6]

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

You might also like