Question Paper Code : 30007
B.E./B.Tech. DEGREE EXAMINATIONS, APRIL/MAY 2023.
Second Semester
Artificial Intelligence and Data Science
AD 3251 — DATA STRUCTURES DESIGN
(Common to : Computer Science and Business Systems)
(Regulations 2021)
Answer ALL questions.
PART A — (10 × 2 = 20 marks)
- 1.
What is ADT, give examples?
- 2.
What is an Algorithm? How to compute its time complexity?
- 3.
How double ended queue is different from circular queue?
- 4.
What is Stack ADT? List its operations.
- 5.
What is Hashing? What is it's importance in data structures?
- 6.
What is sorting in data structure and explain why in-place sorting is better?
- 7.
Define tree traversal and what is the time complexity of level order traversal?
- 8.
Define Heap in Data Structures.
- 9.
What is a complete graph and represent k4 graph?
- 10.
How many edges at most can a Directed Acyclic Graph possess, with number of vertices greater than 1?
PART B — (5 × 13 = 65 marks)
- 11.(a)
- (i)Explain the concepts of Shallow and Deep copying with an example.(8)
- (ii)Write a short note on the ADT and Objects.(5)
- Or
- (b)
- (i)Discuss the Analysis of recursive algorithm with factorial example.(7)
- (ii)Explain the concepts of Python Inheritance with an example.(6)
- 12.(a)
- (i)Write a program to derive an ADT to perform insertion and deletion in a singly linked list.(8)
- (ii)Discuss and write a python program to merge two sorted arrays.(5)
- Or
- (b)
- (i)What is Priority Queue and analyse its implementation?(8)
- (ii)Write a program to implement the stack ADT using linked list(5)
- 13.(a)
- (i)Compare the quick sort with merge sort and write an algorithm to implement merge sort.(8)
- (ii)Derive the time complexity of the bubble sort algorithm.(5)
- Or
- (b)
- (i)Write an algorithm for binary search with an example and explain any one method.(8)
- (ii)Discuss any two techniques to overcome hash collision.(5)
- 14.(a)
- (i)Illustrate the insertion and deletion operation performed in the binary heap.(8)
- (ii)Explain any one tree traversal technique with a suitable example and time complexity.(5)
- Or
- (b)
- (i)Discuss the algorithm used to perform single and double rotation on AVL trees.(8)
- (ii)Explain with an example of multi-way search tree procedure.(5)
- 15.(a)
- (i)Differentiate depth-first and breadth-first search in detail.(8)
- (ii)Illustrate the depth-first search technique.(5)
- Or
- (b)
Examine the topological sorting of a graph G with an example and time complexity.
PART C — (1 × 15 = 15 marks)
- 16.(a)
Convert the given infix expression AB*C+D/E-F into a postfix and postfix output into prefix expressions and explain the procedure in detail. Illustrate the steps.
- Or
- (b)
Consider the given undirected graph and apply Prim's Algorithm to find the minimum spanning tree? Illustrate the steps. [Figure: undirected graph with vertices A, B, C, D and edges A-B = 1, B-D = 2, A-D = 3, A-C = 4, C-D = 5]