Data Structure Using C NCS301 PDF
Data Structure Using C NCS301 PDF
BTECH
(SEM III) THEORY EXAMINATION 2021-22
DATA STRUCTURE USING C
Time: 3 Hours Total Marks: 100
Note: Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
1. Attempt all questions in brief. 2 x 10 = 20
a. Define Data Structures and also the need of data structure.
b. What do you mean by time space trade off?
c. Differentiate between linked list and array.
d. What do you mean by collision in hashing?
e. What is the advantage of using Circular Queue over linear Queue?
f. Define priority queue and its uses?
g. List any two difference between graph and tree.
h. What are the disadvantages of representing binary tree using array?
i. What do you mean by in place sorting algorithm?
j. List any two difference between stack and queue?
SECTION B
2. Attempt any three of the following: 10x3=30
2
2
a. Explain asymptotic notations? Show relationship between f(n) and g(n) in each notation.
1.
03
b. Write the push and pop functions in C simulating push and pop operations of stack
24
implemented using an array.
2_
c. Explain tree traversal techniques and also write algorithm of various tree traversal
5.
2P
techniques.
.5
d. Write algorithm of DFS.
P2
e. 17
Construct AVL tree with the following keys 35, 44, 80, 85, 67,89,25,16,10,14.
Q
|1
SECTION C
12
a. Write C functions to insert a node at the beginning and delete the last node from a doubly
linked list. Also state the advantages and disadvantages of doubly linked list.
13
b. An array ARR[30][20] is stored in the memory with each element occupying 4 bytes and
2
base address is 1000. Find out the address of the index ARR [22][15] using row major order
02
(0 indexing is used).
-2
a. Convert the following infix expression into postfix expression using stack
9-
X + (Y * Z ^ D) + E / W *(F /H)
b. Explain circular queue and write program of enqueue and dequeue operations of circular
|2
queue?
Page 1 of 2
QP22P2_032 | 29-Mar-2022 13:46:12 | 117.55.241.2
Printed Page: 2 of 2
Subject Code: NCS301
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0
BTECH
(SEM III) THEORY EXAMINATION 2021-22
DATA STRUCTURE USING C
6. Attempt any one part of the following: 10x1=10
a. Apply Kruskal algorithm to calculate the cost of the minimum spanning tree for below
graph.
2
b. Explain hashing and various collision resolution techniques with example?
2
1.
03
24
2_
5.
2P
.5
P2
17
Q
|1
12
6:
:4
13
2
02
-2
ar
M
9-
|2
Page 2 of 2
QP22P2_032 | 29-Mar-2022 13:46:12 | 117.55.241.2