Data structure
Data structure
(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.
h) In a binary tree, what are the two common ways that a binary tree is 2M
represented in memory?
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
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
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.
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
---oo0oo---