Data Structures Exam Papers 2024
Data Structures Exam Papers 2024
/Seat No_______________
Marks
Q.1 (a) Differentiate Primitive and Non Primitive Data Structures 03
(b) Derive basic operation of stack and write C function to implement it. 04
(c) Explain Row Major and Column Major with Example. 07
(c) Explain the concept of a binary search tree (BST) and its properties. 07
Discuss how operations such as insertion, deletion, and searching are
performed in a BST.
OR
Q.5 (a) Define (1) Forest (2) Leaf Node (3) Tree 03
(b) Construct tree from Following 04
In order Traversal: D, B, E, A, F, C
Pre order Traversal: A, B, D, E, C, F
(c) Discuss the key concepts and techniques of AVL trees and 2-3 trees, 07
focusing on their balance mechanisms and the impact on performance.
Provide examples of insertions and deletions to illustrate how these trees
maintain balance.
***********
2
Enrolment No./Seat No_______________
Q.1 (a) Explain data structure. Enlist and explain the importance of data structure. 03
(b) Define time and space complexity. Derive time complexity of merge sort. 04
(c) 1) Evaluate the postfix expression in tabular forms: 2 5 3 - * 8 / 4 + 03
2) Evaluate the prefix expression in tabular forms: / 7 * 1 + 4 – 6 3 04
Q.3 (a) Write an algorithm to add a node into a binary search tree. 03
(b) Explain Dequeue and Priority queue in detail. 04
(c) Construct the minimum spanning tree using prim’s algorithm for the 07
following graph.
OR
Q.3 (a) Write an algorithm to delete an item from the doubly linked list. 03
(b) Differentiate: BFS and DFS. 04
(c) Construct the minimum spanning tree using krushkal’s algorithm for the 07
following graph.
Q.4 (a) Define the terms below: 03
1) Threaded Tree 2) Acyclic graph 3) Sparse matrix
(b) Explain AVL tree in detail with suitable example. 04
(c) Construct a binary tree from the traversals given below: 07
Inorder : D, B, E, H, A, I, F, C, G
Preorder : A, B, D, E, H, C, F, I, G
OR
Q.4 (a) Define the terms below: 03
1) Complete Binary Tree 2) Forest 3) Abstract data type
(b) Explain 2-3 tree in brief. 04
(c) Write an algorithm to insert an item as below: 07
1) At the start of the linked list
2) At the end of the linked list
*************
Seat No.: ________ Enrolment No.___________
MARKS
Q.1 (a) Define data structure. Enlist and explain types of data structure. 03
(b) Differentiate static and dynamic memory allocation. 04
(c) Convert the following infix expression into postfix expression using stack. 07
(A-B)/C*D^(E/F)^(G+H)
1
(c) Enlist and explain collision resolution techniques in hashing. 07
OR
Q.5 (a) Differentiate sequential search and binary search. 03
(b) Define file organization. Briefly summarize different file organizations. 04
(c) Do as directed below:
i) Sort following elements using quick sort. 05
10 15 28 09 40 35 29 12 06 07
ii) State time and space complexity of quick sort. 02
*************
2
Seat No.: ________ Enrolment No.___________
Q.1 (a) What is DS? Explain data structure and its types. 03
(b) Explain Tower of Hanoi with example. 04
(c) Write algorithms to insert, and delete elements in queue 07
Q.2 (a) Construct Binary Tree where the preorder traversal is 1,2,4,5,3,6,8,9,7 & 03
postorder is 4,5,2,8,9,6,7,3,1.
(b) Construct an AVL Tree by inserting numbers from 1 to 8. 04
(c) What is stack? Explain operations on stack in detail. 07
OR
(c) Explain tree traversal in detail with example. 07
Q.4 (a) List all asymptotic notations and explain any one of it. 03
(b) List and explain linked list applications. 04
(c) What is doubly linked list? Write Algorithm for insertion and deletion in 07
doubly linked list.
OR
Q.4 (a) What is file? Explain types of files. 03
(b) Convert the following infix expressions to their prefix. 04
(A^B*C-D+E/F/(G+H))
(c) Explain Prim’s & Kruskal’s algorithm with suitable example 07
1
Seat No.: ________ Enrolment No.___________
Q.2 (a) What is Sparse matrix? Write efficient vector representation of following 03
Sparse matrix.
1 0 0
0 2 0
0 0 3
(b) What is the worst case complexity of binary search? Write an algorithm for 04
binary search.
(c) Create Binary Search Tree for following Data and write pre-order traversal, in- 07
order traversal and post-order traversal of the constructed tree.
10 15 28 09 39 31 30 14 07 08
OR
(c) Create AVL tree for following Data and write pre-order traversal of the 07
constructed tree.
10 15 28 09 39 31 30 14 07 08
Q.3 (a) Write c program for bubble sort. 03
(b) Write algorithm to insert into simple queue and mention the limitation of 04
simple queue?
(c) Find the minimum spanning tree of following graph using Kruskal’s method. 07
OR
1
Q.3 (a) Write c program for selection sort. 03
(b) Write algorithm to delete from circular queue and mention the advantage of 04
circular queue over simple queue?
(c) Find the minimum spanning tree of the following graph using prim’s method. 07
Q.4 (a) What is priority queue? Is simple queue is anyhow priority queue? Explain 03
your answer.
(b) Write C program to find the Fibonacci sequence of n terms using recursion. 04
(c) Explain DFS and BFS with appropriate example. 07
OR
Q.4 (a) What is linked list? States the advantages of linked list over array. Also list 03
various types of the linked list.
(b) Write recursive solution for tower of Hanoi. How many moves require for 04
transferring three discs?
(c) Explain Dijkstra’s shortest path algorithm with appropriate example 07
2
Seat No.: ________ Enrolment No.___________
Q.3 (a) Write user defined ‘C’ function to insert node at a specific location in singly 03
linked list.
(b) Write user defined ‘C’ function to delete node from end in circular linked 04
list.
(c) Write a ‘C’ program to implement queue using linked list. 07
OR
Q.3 (a) Write user defined ‘C’ function to insert node at the end in circular linked list. 03
(b) Write user defined ‘C’ function to delete node from a specific location in 04
doubly linked list.
(c) Write a ‘C’ program to implement stack using linked list. 07
Q.4 (a) Construct a binary tree from the traversals given below: 03
Inorder: D, B, A, E, G, C, H, F, I
Preorder: A, B, D, C, E, G, F, H, I
(b) Write a short on AVL tree. 04
(c) Explain the concept of B-tree with suitable example and list its applications. 07
OR
Q.4 (a) Construct a binary search tree from the following numbers. 03
38, 13, 51, 10, 12, 40, 84, 25, 89, 37, 66, 95
(b) Explain BFS and DFS. 04
(c) Explain B+ tree with example. 07
**********
2
Seat No.: ________ Enrolment No.___________
1
Seat No.: ________ Enrolment No.___________
Marks
Q.1 (a) Compare array and linked list. 03
(b) Compare primitive and non primitive data types. datastructures 04
(c) Write an algorithm to perform insert and delete operations on simple queue. 07
Q.2 (a) Search the number 50 from the given data using binary search technique. 03
Illustrate the searching process.
10, 14, 20, 39, 41, 45, 49, 50, 60
(b) Apply merge sort algorithm to the following elements. 20, 10, 5, 15, 25, 30, 04
50, 35
(c) Write a ‘C’ program for bubble sort. 07
Q.5 (a) Define: 1. Acyclic graph 2. Leaf node 3. Complete binary tree 03
(b) For following expressions, construct the corresponding binary tree. 04
1. A+B/C*D-E
2. ((A+B)-(C*D))%((E^F)/(G-H))
(c) How are graphs represented inside a computer’s memory? Which method 07
do you prefer and why?
1
Q.8 (a) Give a brief note on indexing. 03
(b) Build a chained hash table of 10 memory locations. Insert the keys 131, 3, 04
4, 21, 61, 24, 7, 97, 8, 9 in hash table using chaining. Use h(k) = k mod m.
(m=10)
(c) Consider the hash table of size 10. Using quadratic probing, insert the keys 07
72, 27, 36, 24, 63, 81, and 101 into hash table. Take c1=1 and c2=3.
**********************
2
Seat No.: ________ Enrolment No.___________
Marks
2
Seat No.: ________ Enrolment No.___________
Marks
Q.1 (a) Discuss various types of data structures with 03
example.
(b) What is hash function used for? Give one example 04
of a hash function.
(c) What is time and space analysis? State and explain 07
time analysis for linear search and binary search
method.
****************