Registration No:
-- 2
Total Number of Pages: 02
02 4 B. Tech, IDD (B. Tech and M. Tech)
RCS3C002
1/ 2
rd
0 0
3 Semester/Regular/Back Examination: 2023-24
9 - 2 CSEAIME, ELECTRICAL & C.E, ELECTRONICS & C.E, IT
Data Structure
10
CSE, CST, CSEAI, CSEDS, CSIT,
Time: 3 Hours
Max Marks: 100
Q.Code : N497
- - 2
Answer Question No.1 (Part-1) which is compulsory, any eight from Part-II and any two
2 0 24
from Part-III.
The figures in the right hand margin indicate marks.
01 /
2 0 / Part-I
9-
Q1 Answer the following questions: (2 x 10)
0 do you mean by the complexity of an algorithm?
1What - 2
a)
b)
2
Write the physical significance of the asymptotic notations. 4 -
c)
/ 2
Write an algorithm to delete an element from the middle 0 of an array of elements.
d)
e)
Write the ADT for circular queue.
Write the advantages of postfix expression0 /
over
1 expression.
0infix
f)
9 - 2
Write the ADT of a self-referential structure.
g)
h)
1 0 of quick sort. Justify your answer.
What is the worst-case time complexity
+
Differentiate between B tree and B tree.
i)
2
What is the time complexity of bubble sort if the array is fully sorted? Justify your
--
answer.
0
j) Write the advantages of threaded binary 2 4 tree over binary tree with respect to tree
traversal.
1 / 2
0 / 0
Q2 - 2 Part-II
9 Answer Type Questions- (Answer Any Eight 2out of (6 × 8)
Twelve) 10
Only Focused-Short
4 --
- - 2 to implement linear search for a sorted array.2Find0 2 the best case,
4
a) Write an algorithm
worst2case and average case time complexity. 1 /
0 the recursive algorithm of binary search. Find 0the/0best case, worst case and
2
b) /Write
1 average case time complexity. 2
/ 0
0 c) Write the algorithms to illustrate the insertion 9 -
0and deletion of on a circular queue.
9 - 2 d)
1
10
Write an algorithm to evaluate a prefix expression. Explain your algorithm with an
example.
e) Convert the following infix expression to postfix expression. Show each step of the
procedure.
(a+b)*(c-d)/e$f*g
f) Write any two applications of stack and two applications of queue.
g) Write the algorithm to illustrate the insertion and deletion operation on a doubly
linked list.
-- 2
h)
i)
02 4
Write the algorithm to search an element from a circular linked list.
Write the heapify procedure to create a heap with an array of n numbers and find
the time complexity.
1/ 2
j)
disadvantages. 2 0 /0
Differentiate between DFS and BFS with example. Explain their advantages and
k)
09 -
Sort the following array of elements using quick sort.
l)
1
43, 56, 12, 98, 27, 54, 67, 29, 15, 36
What is collision in hashing and explain the methods to overcome it.
- - 2
Part-III
2 0 24
Only Long Answer Type Questions (Answer Any Two out of Four)
Q3 a)
01 /
Define the asymptotic notations Big O, Big Omega, Big theta, small o and small (8)
omega.
2 0 /
Q4
b)
a)
If
10 9- then prove that f(n) = O(n2).
2
Write the conditions to illustrate the empty and full condition of circular queue.
(8)
(8)
4 --
Also write the algorithms to illustrate the insertion and deletion operations on a
circular queue.
2 02
b) /
What is priority queue? Explain the insertion and deletion operations on a priority
1 (8)
Q5 a)
queue implemented by using an array.
2 0 /0
Write an algorithm to create a single linked list with 10 elements and then display (8)
-
109
the linked list.
b) What is AVL tree? Explain various rotations used in AVL tree to construct a (8)
balanced tree.
Q6 a)
- 2
Write the algorithm of merge sort and find the worst, best and average case time
- (8)
b)
complexity.
02 4
Write the algorithm to illustrate the insertion and deletion operation in a binary (8)
search tree.
0 1 /2
20 /
0 9 -
1 -- 2
2 4
2 4 --2 / 2 0
20 /0 1
0 1 / - 2 0
- 20/ 109
10 9