Question Paper Code : 20010
B.E./B.Tech. DEGREE EXAMINATIONS, NOVEMBER/DECEMBER 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.
Define data structures and how the data types are classified at the higher level.
- 2.
What is recursion in data structure?
- 3.
Find the Abstract Data Type in linked lists that has no NULL links, Justify.
- 4.
List the applications of Stack ADT concerning computing systems.
- 5.
What is recurrence for the worst case of QuickSort and what is the time complexity in the Worst case?
- 6.
What is the load factor in data structure?
- 7.
What is the difference between tree depth and height?
- 8.
Define Heap in Data Structures. What are the properties of a heap?
- 9.
Find the number of edges present in a complete graph having n vertices.
- 10.
Define Complete Graph and Finite Graph.
PART B — (5 × 13 = 65 marks)
- 11.(a)
- (i)Explain the Asymptotic Notations in detail and their types with a suitable example program.(8)
- (ii)Write a short note on the namespace in python and its types.(5)
- Or
- (b)
- (i)Discuss the shallow and deep copying and differentiate its pros and cons.(8)
- (ii)Explain in short about python classes and objects.(5)
- 12.(a)
- (i)Write a program to traverse a doubly linked list using only one space for the address field with every node.(8)
- (ii)Explain the list ADT with an example.(5)
- Or
- (b)
- (i)What is stack ADT and what are the various operations on Stack? Write the python program to perform its operation.(8)
- (ii)What is Queue ADT and what are the various operations on Queue?(5)
- 13.(a)
- (i)Suppose we are sorting an array A[2 5 1 7 9 12 11 10] using Bubble sort. Give all the steps while sorting the array. What is the best and worst case time complexity of Bubble sort?(8)
- (ii)Define hash function. How will you calculate the hash function using division.(5)
- Or
- (b)
- (i)Suppose we are sorting an array A[ 5 4 1 10 18 15 11] using Insertion sort. Give all the steps while sorting the array. Calculate its best time and worst time complexity based on the given example.(8)
- (ii)Derive the time complexity of the quick sort algorithm.(5)
- 14.(a)
The inorder and preorder traversal of a binary tree are "D B E A F C G" and "A B D E C F G", respectively. What would be the postorder traversal of the binary tree? Illustrate the steps.
- Or
- (b)
Discuss about the AVL trees along with it's properties and advantages with suitable example.
- 15.(a)
The adjacency matrix of a four-vertex graph is shown in below figure. List the sequence of nodes visited starting from vertex 4, in depth-first search on the graph. [Adjacency matrix with rows and columns A, B, C, D: A: 0 1 0 0; B: 1 0 1 0; C: 0 1 0 1; D: 0 0 1 0]
- Or
- (b)
Discuss in detail about the tree traversal with a suitable example and explain various tree traversals methods.
PART C — (1 × 15 = 15 marks)
- 16.(a)
Convert the given postfix expression ABC*+D/E-FQ* into a prefix and infix expressions and explain the procedure in detail. Illustrate the steps.
- Or
- (b)
Consider the given undirected graph and apply Kruskal's Algorithm to find the minimum spanning tree. Illustrate the steps. [Figure: undirected graph with vertices A, B, C, D, E and edges A-B = 1, A-C = 7, B-C = 5, B-D = 3, B-E = 4, C-D = 6, E-D = 2]