0% found this document useful (0 votes)
63 views

23A05201T Data Structures

Data structures
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

23A05201T Data Structures

Data structures
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Code: 23A05201T R23

B.Tech I Year II Semester (R23) Regular Examinations June/July 2024


DATA STRUCTURES
(Common to CSE, IT, CS&IT, CSE(AI&ML), CSE(AI), CSE(CS), CSE(DS), CSE(IOT), AI&DS, AI&ML, CS&D and AI)

Time: 3 hours Max. Marks: 70


PART – A
(Compulsory Question)
*****
1 Answer the following: (10 X 02 = 20 Marks)
(a) What is Data Structures? Why to study data structures? 2M
(b) Enlist and explain linear and non linear data structures. 2M
(c) What are the advantages and disadvantages of circular linked list? 2M
(d) Explain with suitable example header linked list. 2M
(e) What push() operation in stack. Explain with small example. 2M
(f) Write algorithm to implement pop() operation. 2M
(g) What is double ended queue? 2M
(h) What is rear and front pointers in queue. 2M
(i) Why tree is called as non-linear data structures? 2M
(j) Explain with example representation of tree data structures in memory. 2M

PART – B
(Answer all the questions: 05 X 10 = 50 Marks)

2 (a) What is insertion sort? Sort the following numbers using insertion sort. 5M
29 7 10 5 34 99 50
(b) What is Big – O notation? What is relationship between f(n) and g(n)? 5M
OR
3 (a) What is selection sort? Sort the following works using selection sort. 5M
Amey, Rahul, Shiva, Bell, Cat, Zebra
(b) What is Omega – Ω notation? What is relationship between f(n) and g(n)? 5M

4 (a) What is difference between linked list and array data structures? 5M
(b) What is C programming language construct used to represent a diagrammatic node of the 5M
doubly linked list. Explain with suitable example.
OR
5 Write algorithm to do the following operations on circular linked list. 10M
(i) Add new node at the beginning of linked list.
(ii) Delete first node of the linked list.

6 (a) A single array A[1...Maxsize] is used to implement two stacks. Two stacks grow from opposite 5M
ends of the array. Variables top1 and top2 (top1 < top2) points to the location of the topmost
element in each of the stack. Insert the elements: A, B, C in stack 1 and insert X, Y, Z in the
stack 2 and show each of the stack content. Also, if the space is to be used efficiently, what is
condition for stack full?
(b) What is stack data structures? Why stack is called abstract data type? 5M
OR
7 Write an algorithm to evaluate a postfix expression using stack. Execute your algorithm using 10M
the postfix expression as your input: ab + cd + ∗f ↑

Contd. in page 2

Page 1 of 2
Code: 23A05201T R23

8 (a) What is queue data structures? If insert 10, 20, 6, 9, 26 and delete(), delete() functions called 5M
then what will be the rear and front pointer values after each operation?
(b) What is double ended queue? How double ended queues can be implemented? Explain with 5M
suitable example.
OR
9 Write an algorithm to implement queue with insert and delete operations using singly linked 10M
list.

10 (a) Given the following inorder and preorder traversal sequence reconstruct a binary tree: 5M
Inorder sequence: D, G, B, H, E, A, F, I, C
Preorder sequence: A, B, D, G, E, H, C, F, I
(b) What is hash data structure? Consider the Keys (k) = {15, 38, 41, 62, 3, 13, 76} are inserted 5M
into an empty hash table using hash function H(k) = (k mod 7) and linear probing is used for
collision resolution. Give content of the hash table after every key insertion.
OR
11 The following numbers are inserted into an empty binary search tree in the given order. 10M
10, 2, 4, 6, 14, 11, 15
Construct binary search tree. Also, what is the height of the tree?

*****

Page 2 of 2

You might also like