November / December 2024
Data Structures
Anna University
1 question papers available. Select an examination session to view its question paper.
Data Structures
Based on available extracted papers. Question groups and frequency are provisional, not official syllabus weightage or examination predictions.
How do you initialize an array with predefined values? 2 2 2
0 eligible source papersWhy Radix Sort is called a stable sorting algorithm? 2 1 2
0 eligible source papersDefine a doubly linked list and its structure. 2 3 1
0 eligible source papersWhat is a Deque, and state its operations? 2 3 1
0 eligible source papersWhat are the height and depth of a binary tree? Give an example 2 3 1
0 eligible source papersWhat is the difference between FindMin and FindMax operations 2 5 2 in a binary heap?
0 eligible source papersHow graphs are represented using adjacency matrices and 2 4 2 adjacency lists?
0 eligible source papersWhat is the difference between Prim's and Kruskal's algorithms for 2 4 2 finding the Minimum Spanning Tree (MST)?
0 eligible source papersWhat is the primary goal of a hash function? 2 5 1
0 eligible source papersWhat is Rehashing in the context of hashing? 2 5 1
0 eligible source papers(a) i) Describe the concept of static and dynamic data structures 6 2 1 with examples (e.g., arrays vs. linked lists). ii) Write a C program to implement a Book structure that contains the following fields: 7 2 3 • title (string) . • author (string) • price (float) Operations; • Accept details of 5 books from the user. • Display the book details. • Sort the books based on price in ascending order.
0 eligible source papers(b) i) Define Abstract Data Types (ADTs). Discuss the advantages 6 1 1 and implementation of ADTs with suitable examples. ii) State and implement the Quick Sort algorithm to sort an 7 1 array of integers, choosing the last element as the pivot for 3 partitioning. Input: An array of integers. For example: [34, 7, 23, 32, 5, 62].
0 eligible source papers(a) i) Discuss operations like insertion, deletion, and access in an 6 1 2 array-based list. ii) Implement the following operations in a singly linked list and 7 2 3 write the pseudo code: 1. Add a node at the end of the list. 2. Remove a node at a specified index. 3. Display the list after each operation.
0 eligible source papers(b) i) Discuss the differences between a Stack and a Queue. 6 2 2 Explain the working principles of both and illustrate their applications. ii) Write the algorithm to solve the Tower of Hanoi problem using recursion and demonstrate the steps involved in 7 1 3 moving disks.
0 eligible source papers(a) i) Explain the different types of tree traversals for a binary tree 6 3 2 using recursion. Discuss their applications in different scenarios. ii) Given the arithmetic expression a*(b + c) + ((d + e*f)*g), 7 2 3 evaluate the expression and construct the expression tree, where: a = 2, b = 3, c = 4, d = 5, e = 6, f = 7, g = 8. [OR] i) Explain the Insertion and Deletion operations in a Binary 6 3 2 Search Tree (BST). Illustrate the process of inserting and deleting nodes with examples, covering all possible cases of deletion. 7 1 3 ii) Explain Heap Sort in detail. Discuss how it uses the Binary Heap data structure to sort an array. Provide a step-by-step breakdown of how the algorithm works.
0 eligible source papers(a) i) Compare and contrast Breadth First Search (BFS) and Depth 6 4 2 First Search (DPS). Provide a scenario where one would be preferred over the other. ii) Given the following directed acyclic graph (DAG), perform a 7 4 3 Topological Sort and explain the process step by step. m \ P i / O - ©
0 eligible source papers(b) i) Describe the steps involved in Dijkstra's algorithm for finding 6 4 2- the shortest path from a source node to all other nodes in a weighted graph. ii) Given the following weighted graph, find the shortest path from 0 to ail other vertices.
0 eligible source papers(a) i) Discuss the advantages and disadvantages of using Separate Chaining as a collision resolution technique ii) Consider a hash table of size 10 and the following list of numbers to be inserted: 42, 15, 27, 14, 33, 59, 72, 10, and 56. Explain the process of separate chaining for collision resolution and describe how the table is updated during each insertion. (Hash Function : Multiplication method)
0 eligible source papers(b) Describe the various techniques for collision resolution through 13 open addressing. • Linear Probing • Quadratic Probing • Double Hashing Given the following hash table of size 10 and the list of integers to insert: 42,15,27,14,33,59,72,10,56 Assume the hash function is h(x) = x mod 10 and apply the following collision resolution techniques: 1. Linear Probing: Resolve any collisions using linear probing. 2. Quadratic Probing: Resolve any collisions using quadratic probing. 3. Double Hashing: Use a secondary hash function h2(x) = 9 - (x mod 9) for resolving collisions. PART- 0(1 X 15=15Marks)
0 eligible source papersi) Create nested structures to giqre name, id, pay, and 8 deductions for the set of 100 employees in an organization. Given pay and deductions are monthly details, same for all the months. The deductions include G P F , F B F and S P F . Write a C program to calculate income tax to be paid if total income exceeds 1 lakh with tax as 20% of the excess amount and 30% if total exceeds 3 lakhs. Print the report with name, id, and tax to be paid, ii) Illustrate the operation of Insertion sort on the given array with an algorithm. 9 4 1 2 5 6 8 16 7 3 12 14 15 18 19 10 11 13 17 20
0 eligible source papersHistorical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.