Data Structures 22CSC05-1
Data Structures 22CSC05-1
: 22CSC05
CHAITANYA BHARATHI INSTITUTE OF TECHNOLOGY (Autonomous)
B.E. III Sem (Main) Examination Dec 2023 – Jan 2024
Data Structures
(Common to CSE, CSM, CET, AI&ML, IT, AI&DS)
Time: 3 Hours Max Marks: 60
Note: Answer ALL questions from Part-A at one place in the same order and Part–B
(Internal Choice)
Part - A
(5Q X 2M = 10 Marks)
M CO BT
1 Solve the recurrence T(n) =2T( n/2) +C , T(1) = 1. (2) 1 2
2 If the values of A, B, C, and D are 2, 3, 4, and 5, respectively, evaluate the (2) 2 3
following postfix expressions: (i) A B * C – D + (ii) A B C + * D –
3 Recall the various applications of Linked Lists. (2) 3 1
4 Name two balanced search trees. (2) 3 1
5 What is the depth first traversal path of the following graph where, the (2) 5 3
traversal starts at vertex 0.
8 (a) Convert the following infix expression into postfix expression. Show the (5) 2 3
tracing of the algorithm step by step using stack: A+B*(C+D)/F+D*E
(b) Implement Stack ADT using Arrays. (5) 2 2
(OR)
9 (a) Give a detailed account of Double Ended Queues. (5) 2 2
(b) Show the contents of a Queue at each stage after performing each of the (5) 2 2
following operations: enqueue(56), enqueue(22), enqueue(34),
dequeue(), dequeue(), enqueue(41), enqueue(92).
Page 1 of 2
Code No.: 22CSC05
10 (a) Write short notes on the following Linked list operations: (6) 2 2
(i) InsertEnd (ii) DeleteBegin (iii) Display
(b) Develop an algorithm to reverse a list of elements in a double linked list. (4) 2 4
(OR)
11 (a) Develop a program that reads a list of integers from the keyboard, (5) 2 3
creates a sorted linked list from them, prints the list and finally displays
the minimum of the list.
(b) Explain in brief about Circular Linked Lists and their applications. (5) 2 2
(b) Explain in detail about the delete operation in binary search tree with (5) 2 2
example.
14 (a) Applying BFS on the following graph assuming the starting vertex as A (5) 3 3
and show the trace of the queue while processing each vertex.
(b) Write an algorithm for performing breadth first traversal of a graph. (5) 3 3
(OR)
15 (a) Illustrate with examples the following hash functions: (5) 3 2
i) mid square method ii) folding method
(b) Compare the various collision resolution strategies in detail. (5) 3 2
*****
Page 2 of 2