Printed Page: 1 of 2
Subject Code: KCS301
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0
B. TECH
(SEM III) THEORY EXAMINATION 2020-21
DATA STRUCTURES
Time: 3 Hours Total Marks: 100
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
1. Attempt all questions in brief. 2 x 10 = 20
Q no. Question Marks CO
a. Define Time-Space trade-off. 2 1
b. Differentiate Array and Linked list. 2 1
c. Explain Tail Recursion with suitable example. 2 2
d. Write the full and empty condition for a circular queue data structure. 2 2
e. Examine the minimum number of interchanges needed to convert the 2 3
array 90, 20, 41,18, 13, 11, 3, 6, 8,12, 7, 71, 99 into a maximum heap.
f. Differentiate sequential search and binary search. 2 3
g. Compute the Transitive closure of following graph. 2 4
P
0Q
1
13
h. Write short notes on adjacency multi list representation a Graph. 2 4
29
i. What is the importance of threaded binary tree? 2 5
2.
0E
24
j. Write short notes on min heap. 2 5
P2
5.
_Q
.5
SECTION B 17
TU
2. Attempt any three of the following:
|1
Q no. Question Marks CO
AK
a. Consider a multi-dimensional Array A[90] [30] [40] with base address 10 1
:1
starts at 1000. Calculate the address of A[10] [20] [30] in row major
42
order and column major order. Assume the first element is stored
at A[2][2][2] and each element take 2 byte.
:
13
b. Evaluate the following postfix expression using stack. 10 2
1
2 3 9 * + 2 3 ^ - 6 2 / + , show the contents of each and every steps. also
02
find the equivalent prefix form of above expression. Where ^ is an
-2
exponent operator.
ar
c. Explain any three commonly used hash function with the suitable 10 3
M
example? A hash function H defined as H(key) =key%7, with linear
2-
probing, is used to insert the key 37,38,72,48,98,11,66 into a table
indexed from 0 to 6. what will be the location of key 11? Justify your
|2
answer, also count the total number of collisions in this probing.
d. Write an algorithm for Breadth First search (BFS) and explain with the 10 4
help of suitable example.
e. If the in order of a binary tree is B,I,D,A,C,G,E,H,F and its post order is 10 5
I,D,B,G,C H,F,E,A then draw a corresponding binary tree with neat and
clear steps from above assumption.
1 | P a g e
AKTU_QP20E290QP | 22-Mar-2021 13:42:16 | 117.55.242.131
Printed Page: 2 of 2
Subject Code: KCS301
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0
SECTION C
3. Attempt any one part of the following:
Q no. Question Marks CO
a. Consider the two dimensional lower triangular matrix (LTM) of order 10 1
N ,Obtain the formula for address calculation in the address of row
major and column major order for location LTM[j][k], if base address
is BA and space occupied by each element is w byte.
b. Write a C program to insert a node at kth position in single linked list. 10 1
4. Attempt any one part of the following:
Q no. Question Marks CO
a. Convert the following infix expression to reverse polish notation 10 2
expression using stack.
𝑏 √𝑏 4𝑎𝑐
𝑥
2𝑎
b. Write a C program to implement stack using single linked list. 10 2
P
0Q
5. Attempt any one part of the following:
1
13
29
Q no. Question Marks CO
2.
a. Write an algorithm for merge sort and apply on following elements 10 3
0E
24
45,32,65,76,23,12,54,67,22,87.
P2
b. Write a C program for Index Sequential Search. 10 3
5.
_Q
.5
17
6. Attempt any one part of the following:
TU
|1
Q no. Question Marks CO
AK
a. Describe Prim`s algorithm and find the cost of minimum spanning tree 10 4
6
using Prim`s Algorithm.
:1
: 42
13
1
02
-2
b. Apply the Floyd warshall’s algorithm in above mentioned graph 10 4
(i.e. in Q.no 6a)
ar
M
2-
7. Attempt any one part of the following:
|2
Q no. Question Marks CO
a. Write Short notes of following 10 5
(a) Extended Binary Trees (b) Complete Binary Tree
(c) Threaded Binary Tree.
b. Insert the following sequence of elements into an AVL tree, starting 10 5
with empty tree 71,41,91,56,60,30,40,80,50,55 also find the minimum
array size to represent this tree.
2 | P a g e
AKTU_QP20E290QP | 22-Mar-2021 13:42:16 | 117.55.242.131