Question Paper Code : 30091
B.E./B.Tech. DEGREE EXAMINATIONS, APRIL/MAY 2023.
Second / Third Semester
Computer Science and Design
CD 3291 — DATA STRUCTURES AND ALGORITHMS
(Common to : Computer Science and Engineering (Artificial Intelligence and Machine Learning)/Computer Science and Engineering (Cyber Security)/Computer and Communication Engineering/Information Technology)
(Regulations 2021)
Answer ALL questions.
PART A — (10 × 2 = 20 marks)
- 1.
Define an algorithm. List some essential properties of algorithm.
- 2.
Write about recursion.
- 3.
Identify the data structures to represent Stack.
- 4.
List out the advantages of circularly linked list.
- 5.
Compare bubble sort and Insertion sort in terms of time Complexity.
- 6.
Differentiate between linear search and binary search.
- 7.
Define B - Tree. List its properties.
- 8.
Write about the AVL tree.
- 9.
Write the steps required to construct the minimum spanning tree.
- 10.
What is bi - connected graph? Give an example.
PART B — (5 × 13 = 65 marks)
- 11.(a)
Discuss in detail about different classification of algorithms.
- Or
- (b)
Elaborate about the asymptotic notations with appropriate examples.
- 12.(a)
Explain the insertion operation in linked list. How nodes are inserted after a specified node.
- Or
- (b)
Explain Stack ADT and its operations.
- 13.(a)
Discuss the common collision resolution strategies used in clothing hashing system.
- Or
- (b)
Write an algorithm to implement insertion sort with suitable example.
- 14.(a)
How to insert and delete an element into a binary search tree and write down the code for the insertion routine with example.
- Or
- (b)
Describe the algorithms used to perform single and double rotation on AVL tree.
- 15.(a)
Explain the various representation of graph with example in detail.
- Or
- (b)
Write an algorithm for greedy approach and give one real time example.
PART C — (1 × 15 = 15 marks)
- 16.(a)
Construct an expression tree for the expression (a + b * c) + ((d * e + 1) * g). Give the outputs when you apply preorder, inorder and postorder traversals.
- Or
- (b)
Construct the minimum spanning tree (MST) for the given graph using Prim's Algorithm. Find the Cost of Minimum Spanning Tree. [Figure: weighted undirected graph with edges 1-2 28, 1-6 10, 2-3 16, 2-7 14, 3-4 12, 4-5 22, 4-7 18, 5-6 25, 5-7 24]