0% found this document useful (0 votes)
35 views8 pages

Data Structures Jan 2023

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)
35 views8 pages

Data Structures Jan 2023

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/ 8

Code No: R203105F R20 SET - 1

III B. Tech I Semester Regular Examinations, Dec/Jan -2022-23


DATA STRUCTURES
(Common to CE,ME,ECE)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions ONE Question from Each unit
All Questions Carry Equal Marks
*****

UNIT-I
1. a) Write a program to reverse the given single linked list with [7M]
starting node as ‘head’.
b) What are the operations of stack? List its applications in [7M]
computer science.
(OR)
2. a) Write a program to implement stack using linked list. [7M]
b) How can we find the address of a second node from the end in a [7M]
single linked list? Write pseudo code for it.
UNIT-II
3. a) Write a program to implement selection sort. [7M]
b) Write a program to find maximum element in a binary tree. [7M]
(OR)
4. a) Write a program to implement binary search. [7M]
b) What is Hash function? What are its types? How can we handle [7M]
the collision using separate chaining and analyze its
performance?
UNIT-III
5. a) Write a program to insert an element into a Binary search tree. [7M]
b) What is an expression tree? Explain evaluation of an expression [7M]
tree with an example.
(OR)
6. a) Compare full and complete binary trees with examples. [7M]
b) Explain how can we delete a node with both the children from a [7M]
binary search tree? Give an example.
UNIT-IV
7. a) Construct an AVL Tree with the following elements and [7M]
determine the number of levels in the constructed tree.
25, 21, 32, 37, 45, 5, 9, 15, 84, 7, 91, 3, 6, 41, 1
b) Define B-Tree of order 5. Explain insertion procedure in B-tree of [7M]
order 5.
(OR)
8. a) Define AVL Tree. What are types of rotations performed while [7M]
inserting an element into an AVL tree?
b) Construct a B-Tree of order 5 with the following elements. [7M]
52, 85, 94, 65, 74, 84, 37, 15, 19, 21, 62, 77, 99, 101, 137

1 of 2
|''|'||||''|'''|||'|
Code No: R203105F R20 SET - 1

UNIT-V
9. a) Explain how can we find maximum element in the minimum [7M]
heap? Write a pseudo code for it.
b) What is a Splay tree? How it is different from binary search tree? [7M]
(OR)
10. a) Compare the implementation of search operation in binary [7M]
search, AVL and red black trees.
b) How to perform insertion and deletion in Priority Queue [7M]
implemented using min-heap? Explain with suitable examples.

2 of 2
|''|'||||''|'''|||'|
Code No: R203105F R20 SET - 2

III B. Tech I Semester Regular Examinations, Dec/Jan -2022-23


DATA STRUCTURES
(Common to CE,ME,ECE)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions ONE Question from Each unit
All Questions Carry Equal Marks
*****
UNIT-I
1. a) Write a program to implement queue using linked list. [7M]
b) Explain how can we find the number of nodes in a single linked [7M]
list? Write a pseudo code for it.
(OR)
2. a) What are the operations of Queue? List its applications in [7M]
computer science. Write a program.
b) Write a program to implement single linked list with starting [7M]
node as ‘head’.
UNIT-II
3. a) Write a program to implement insertion sort. [7M]
b) Write the algorithm to illustrate the merge operation of the [7M]
sorted lists of elements.
(OR)
4. a) Write a program to implement linear search. [7M]
b) What is a collision? How can we use separate chaining for the [7M]
collision resolution?
UNIT-III
5. a) Write a program to search for an element in a Binary search [7M]
tree.
b) Write a pseudo code to check whether the given binary search [7M]
tree is balanced or not.
(OR)
6. a) What is a complete binary tree? Draw and determine number of [7M]
levels of a complete binary tree with 14 nodes.
b) Construct a binary search tree with the following elements and [7M]
determine its height.
15, 84, 7, 91, 3, 6, 41, 1, 25, 21, 32, 37, 45, 5, 9
UNIT-IV
7. a) Construct an AVL Tree with the following elements and [7M]
determine its height.
45, 5, 9, 15, 84, 7, 91, 3, 6, 41, 25, 21, 32, 37, 1
b) Construct a B-Tree of order 5 with the following elements. [7M]
52, 85, 94, 65, 74, 84, 37, 15, 19, 21, 62, 77, 99, 101, 137
(OR)
8. a) Define AVL Tree. What are types of rotations performed while [7M]
inserting an element into an AVL tree?
b) Define B-Tree of order 7. Explain deletion procedure in B-tree of [7M]
order 7 with examples.
1 of 2

|''|'||||''|'''|||'|
Code No: R203105F R20 SET - 2

UNIT-V
9. a) How can we find minimum element in the maximum heap? [7M]
Explain.
b) How to perform insertion and deletion in Priority Queue? Explain [7M]
with suitable examples.
(OR)
10. a) Write the implementation of search operation in red black trees.. [7M]
b) What is a Splay tree? How it is different from binary search tree? [7M]
List any two applications of splay trees.

2 of 2

|''|'||||''|'''|||'|
Code No: R203105F R20 SET - 3

III B. Tech I Semester Regular Examinations, Dec/Jan -2022-23


DATA STRUCTURES
(Common to CE,ME,ECE)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions ONE Question from Each unit
All Questions Carry Equal Marks
*****
UNIT-I
1. a) Write a program to insert an element into a single linked list by [7M]
considering all the possible cases.
b) What is a stack? Explain how it can be useful in evaluating [7M]
expressions with suitable examples.
(OR)
2. a) Write a program to implement stack using arrays. [7M]
b) Write a program to insert, delete and print the elements using [7M]
doubly linked list.
UNIT-II
3. a) Write a program to implement quick sort. [7M]
b) Derive the time complexity of quick sort in best, worst and [7M]
average cases.
(OR)
4. a) What is a binary search? Explain how the number 41 can be [7M]
searched in the list containing 11, 15, 20, 24, 27,29, 37, 41, 45,
51, 65, 66, 67, 78, 81, 84, 87, 91.
b) What is Hash function? What are its types? How can we handle [7M]
the collision using separate chaining and analyze its
performance?
UNIT-III
5. a) Write a procedure to find total number of nodes in a binary tree. [7M]
b) Write a program to perform insertion into a Binary search tree. [7M]
(OR)
6. a) Explain how a node with both the children can be deleted from a [7M]
binary search tree with suitable examples.
b) Compare full and complete binary tree with examples. [7M]
UNIT-IV
7. a) Construct an AVL Tree with the following elements [7M]
45, 5, 9, 15, 84, 7, 91, 6, 41, 1, 25, 21, 32, 37, 3
b) Define B-Tree of order 7. Explain deletion procedure in B-tree of [7M]
order 7.
(OR)
8. a) Define AVL Tree. What are double rotations performed while [7M]
inserting an element into an AVL tree?
b) Construct a B-Tree of order 5 with the following elements. [7M]
37, 15, 19, 21, 62, 77, 99, 52, 85, 94, 65, 74, 84, 121

1 of 2
|''|'||||''|'''|||'|
Code No: R203105F R20 SET - 3

UNIT-V
9. a) How can we find second minimum element in the minimum [7M]
heap?
b) What is a Splay tree? How it is different from binary search tree? [7M]
(OR)
10. a) Compare Binary search trees and Red-black trees? [7M]
b) Explain how to perform insertion and deletion in Priority Queue [7M]
implemented using max-heap? Explain with suitable examples.

2 of 2

|''|'||||''|'''|||'|
Code No: R203105F R20 SET - 4
III B. Tech I Semester Regular Examinations, Dec/Jan -2022-23
DATA STRUCTURES
(Common to CE,ME,ECE)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions ONE Question from Each unit
All Questions Carry Equal Marks
*****
UNIT-I
1. a) Write a program to implement queue using arrays. [7M]
b) Explain how to find whether the single linked list contains a loop? [7M]
Write a pseudo code for it. Assume the single linked list is having
initial node as ‘head’.
(OR)
2. a) What are the operations of Circular linked list? List its applications [7M]
in computer science.
b) Write a program to reverse the given single linked list with starting [7M]
node as ‘head’.
UNIT-II
3. a) Write a program to implement heap sort. [7M]
b) Derive the time complexity of quick sort in best, worst and average [7M]
cases. Give examples for each case.
(OR)
4. a) Compare linear search and binary search. [7M]
b) What is a collision? How can we use separate chaining for the [7M]
collision resolution?
UNIT-III
5. a) Write a program to perform search in a Binary search tree. [7M]
b) Derive the maximum number of comparisons performed to search for [7M]
an element in a binary search tree with n*2n nodes.
(OR)
6. a) What is a complete binary tree? Draw and Determine number of [7M]
levels of a complete binary tree with 14 nodes.
b) Construct a binary search tree with the following elements [7M]
45, 5, 9, 3, 6, 41, 1, 25, 21, 32, 15, 84, 7, 91, 37.
UNIT-IV
7. a) Construct an AVL tree with the following elements and determine the [7M]
height of the constructed tree
6, 41, 25, 21, 32, 37, 1, 45, 5, 9, 15, 84, 7, 91, 3.
b) Define B-Tree of order 5. Explain insertion procedure in B-tree of [7M]
order 5 with examples.
(OR)
8. a) Define AVL Tree. Prove that the height of the AVL tree with n nodes [7M]
is O(logn).
b) Construct a B-Tree of order 5 with the following elements and [7M]
determine the height of the constructed tree 219, 221, 162, 177,
299, 101, 137, 152, 185, 94, 165, 74, 284, 137, 115.
1 of 2

|''|'||||''|'''|||'|
Code No: R203105F R20 SET - 4

UNIT-V
9. a) Explain how can we find second maximum element in the [7M]
maximum heap? Write pseudo code for it.
b) Describe how to perform insertion and deletion in Priority Queue? [7M]
Explain with suitable examples.
(OR)
10. a) In which context AVL trees outperform Red-black trees? Justify. [7M]
b) What is a Splay tree? How it is different from binary search tree? [7M]
List any two applications of splay trees.

2 of 2

|''|'||||''|'''|||'|

You might also like