Data Structures RCS305
Data Structures RCS305
BTECH
(SEM III) THEORY EXAMINATION 2021-22
DATA STRUCTURES
Time: 3 Hours Total Marks: 70
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
1. Attempt all questions in brief. 2 x 7 = 14
a. Describe the terms time and space complexity.
b. Distinguish between calloc() and malloc() function.
c. Calculate the address of the 3rd element of an integer array A[6][2] using the starting
address 2000.(Assume integer takes 2 bytes).
d. Write postfix notation of infix expression a*(b+c/d).
e. Illustrate the data structure that follows LIFO order.
f. Compare complete binary and strict binary trees.
g. Write the time complexity of quicksort and bubble sorting algorithm
SECTION B
2. Attempt any three of the following: 7 x 3 = 21
a. Consider 20 X 5 two-dimensional array “marks” which has its base address = 1000
and the size of an element = 2. Calculate the address of the element, marks[18][4]
2
2
1.
03
according to row-major order and column-major order. Write the general formula for
finding the address of the multidimensional array.
24
2_
b. Describe the term stack data structures. Illustrate the implementation of different stack
5.
2P
.5
c. Define the term BST. Explain different types of tree traversal techniques with help of
P2
d.
an example. 17
Write the Quicksort algorithm and illustrate the steps of the algorithm to sort the
Q
|1
following data: 25, 143, 454, 75, 28, 148, 435, 566, 34.
e. Apply prims algorithm to find the minimum cost spanning tree on the given graph.
55
8:
:3
13
2
02
SECTION C
-2
(a) Illustrate the structure ofthe doubly linked list. Write an algorithm to add a new node
9-
1 | P a g e
QP22P2_032 | 29-Mar-2022 13:38:55 | 117.55.241.2
Printed Page: 2 of 2
Subject Code: RCS305
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0
BTECH
(SEM III) THEORY EXAMINATION 2021-22
DATA STRUCTURES
5. Attempt any one part of the following: 7x1=7
(a) Write the Dijkstra algorithm. Apply the algorithm on the following graph to find the
single source shortest path. (Assume A as source).
2
2
1.
03
24
(b) Apply BFS and DFS Algorithms on the following graph.
2_
5.
2P
.5
P2
17
Q
|1
55
8:
:3
13
(a) Describe the term AVL Tree. Illustrate step-by-step construction of AVL tree using the
-2
following data.
ar
23,45,13,56,4,6,7,32,84,89,37,96
M
2 | P a g e
QP22P2_032 | 29-Mar-2022 13:38:55 | 117.55.241.2