0% found this document useful (0 votes)
14 views41 pages

DS Jan 2023 SPPU Question Paper Solution

The document is an examination paper for a Data Structures course, consisting of 8 questions divided into pairs, from which students must choose one question from each pair to answer. Topics covered include Abstract Data Types (ADTs), stacks, queues, linked lists, binary trees, graph representations, and algorithms such as Dijkstra's and Kruskal's. The paper requires neat diagrams and C programming functions for various data structure operations.

Uploaded by

pooja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views41 pages

DS Jan 2023 SPPU Question Paper Solution

The document is an examination paper for a Data Structures course, consisting of 8 questions divided into pairs, from which students must choose one question from each pair to answer. Topics covered include Abstract Data Types (ADTs), stacks, queues, linked lists, binary trees, graph representations, and algorithms such as Dijkstra's and Kruskal's. The paper requires neat diagrams and C programming functions for various data structure operations.

Uploaded by

pooja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Total No. of Questions : 8] SEAT No.

:
PA-1193 [Total No. of Pages : 4
[5925]-215
S.E. (E & TC/Electronics)
DATA STRUCTURES
(2019 Pattern) (Semester - III) (204184)

Time : 2½ Hours] [Max. Marks : 70


Instructions to the candidates:
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.
3) Figures to the right side indicate full marks.
4) Assume suitable data, if necessary.

Q1) a) What is ADT? Explain stack as an ADT. [4]


b) Write a structure for stack using array. Write PUSH and POP function
for stack using array. [8]
c) Evaluate following postfix expression with the help of stack. [6]
5 3 + 6 2/*3 5*+
OR
Q2) a) What is Queue? Explain insertion and deletion operation in Queue with
suitable diagram. [6]
b) Explain with example: [6]
i) Linear Queue
ii) Circular Queue
c) Write C functions for : [6]
i) Enqueue in Linear Queue
ii) Dequeue in Circular Queue

Q3) a) Write structure definition for single Linked list. Differentiate between
static memory and dynamic memory allocation. [6]
b) Write following C functions in SLL: [6]
i) Insert a node at the beginning
ii) Delete a node at the end
c) State the limitations of single linked list. Represent following polynomial
using linked list. [5]
20 x9 + 15 x 7 + 10 x5 + 5 x + 50
OR
P.T.O.
Q4) a) Write structure definition for double Linked list. Differentiate between
array and linked list. [6]
b) State the limitations of array. Draw and explain double linked list. [5]
c) Write following C functions in circular in SLL. [6]
i) Insert a node at the end
ii) Delete all nodes in the list

Q5) a) Define binary tree. Explain following terms with suitable examples: [7]
i) Root node
ii) Left and right sub tree
iii) Depth of tree
b) Construct the Binary Search Tree (BST) from the following data: [5]
CAR, BAG, MAN, ADD, SAD, FAN, TAN
c) Write recursive function for in-order, pre-order and post-order traversal
of Binary tree. [6]
OR
Q6) a) Define the following terms with suitable example with respect to Binary
tree: [6]
i) Strictly Binary Tree
ii) Completely Binary Tree
iii) Binary Search Tree
b) Construct the binary search tree (BST) from the following elements: [6]
45, 20, 80, 40, 10, 90, 70
Also, show pre-order and post-order traversal for the same.
c) What is AVL tree? Explain all the rotations in AVL tree. Construct AVL
tree for the following data: [6]
1, 2, 3, 4, 5, 6

[5925]-215 2
Q7) a) What do you mean by adjacency matrix and adjacency list? Give the
adjacency matrix and adjacency list for the graph shown below: [6]

b) Explain with suitable example, DFS and BFS traversal of a graph. [5]

c) Define with an example: [6]

i) Undirected Graph

ii) Directed Graph

iii) Weighted Graph

OR

Q8) a) Define indegree and outdegree of a vertex in graph. Find the indegree
and outdegree of following graph. [6]

[5925]-215 3
b) Find out Minimum Spanning Tree of the following graph (figure 3) using
Kruskal’s algorithm. [6]

c) Find the shortest path from node ‘a’ to all nodes in the graph shown in
fig.4 using Dijkstra’s algorithm. [6]



[5925]-215 4
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner

You might also like