Course Code: 23PC1201C SET :1 IS-23
(Autonomous)
I B.Tech. IISemester Regular Examination, March-2025
DATA STRUCTURES
(Common to CSE,CAI,AIML,DS)
Time: 3 Hours. Max. Marks: 70
Note: 1. This question paper contains two parts A and B.
2. Part- A is Compulsory which carries 20 marks. Answer all Questions in part A.
3. Part – B consists 5 units.Answer any one question from each unit. Each question
carries 10 marks and may have a, b as sub questions.
PART- A
(20Marks)
1. a) List any two sorting algorithm has a time complexity of O(n log n) in the 2M
average case?
b) What is a linear data structure? 2M
c) What is the key difference between a singly linked list and a doubly 2M
linked list?
d) Describe one advantage of a circular linked list 2M
e) Give one real-world application of a stack and explain how it uses the 2M
LIFO property.
f) Describe one advantage and one disadvantage of implementing a stack 2M
using an array compared to a linked list.
g) What is the key property of a Binary Search Tree 2M
h) In a binary tree, what are the two common ways that a binary tree is 2M
represented in memory?
i) Which data structuresare typically used to implement BFS& DFS? 2M
j) What is the primary difference between Breadth-First Search (BFS) and 2M
Depth-First Search (DFS)?
PART - B
5 × 10 marks = 50
UNIT-I
2 a) Describe the Linear Search and Binary Search algorithms. Analyze their 5M
time complexities and discuss the conditions under which each
algorithm is most efficient.
b) Define quick sort. Explain quick sort algorithm. Apply quick sort 5M
algorithm to sort following list of elements in ascending order: 9, 3, 5,
27, 4, 67, 18, 31, 13, 20, 39, and 21. Clearly show the sorting process at
each step.
OR
3 a) Write a program to implement Quick Sort. 5M
b) Arrange the following list of elements in ascending order using Merge 5M
Sort A, L, G, O, R, I, T, H, M, S. Clearly show the sorting process at
each step
UNIT-II
4 a) How to implement Linked List Using Stack?Explain 5M
b) Write a program to insert and delete the elements from a Circular 5M
Doubly Linked List.
OR
5 Explain how queues can be implemented using Arrays 10M
UNIT-III
6 a) Explain any one application of stack with suitable example. 5M
b) Write the queue over flow and underflow conditions 5M
OR
7 a) Explain the operations of singly linked lists 5M
b) Differentiate between Stacks and Ques. 5M
UNIT-IV
8 a) Write an algorithm to convert an infix expression to a postfix 5M
expression. Trace the algorithm to convert the infix expression
‘(a+b)*c/d+e/f” to a postfix expression.
b) Explain the properties of a binary search tree in detail. 5M
OR
9 a) Explain Breadth First Traversal Technique with an example 5M
b) Construct an expression tree for the expression A+(B-C)*D+(E*F) 5M
UNIT-V
10 a) Define a graph data structure. Explain the difference between directed 5M
and undirected graphs with an example.
b) What is a graph? How to represent graphs? Explain with an example. 5M
OR
11 a) What are connected components of graph? Is there a method to find out 5M
all the connected components of graph? Explain.
b) Explain the differences between BFS and DFS graph traversal 5M
algorithms
---oo0oo---