DS - 2023

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Hall Ticket No Course Code: ACSC08

INSTITUTE OF AERONAUTICAL ENGINEERING


(Autonomous)
Dundigal, Hyderabad - 500 043
B.Tech III SEMESTER END EXAMINATIONS (REGULAR / SUPPLEMENTARY) - FEBRUARY 2023
Regulation: UG20
DATA STRUCTURES
Time: 3 Hours COMMON TO ALL BRANCHES Max Marks: 70
Answer ALL questions in Module I and II
Answer ONE out of two questions in Modules III, IV and V
All Questions Carry Equal Marks
All parts of the question must be answered in one place only

MODULE – I

1. (a) State the properties of an algorithm. Explain the quick sort algorithm with an example and write
the time complexities. [BL: Understand| CO: 1|Marks: 7]
(b) Consider a given list of integers 10, 18, 19, 20, 25, 28, 48, 55, 62, 70 and describe the steps to
implement the binary search method. Write a Python program to find the desired element 25 in
the given list using binary search. [BL: Apply| CO: 1|Marks: 7]

MODULE – II

2. (a) List out the applications of stack. Write a Python program for i) Push ii) Pop iii) Display
operations using the same definition. [BL: Understand| CO: 2|Marks: 7]
(b) Write a program for reversing a linear queue Q. The following standard operations are allowed
on queue.
enqueue(x) : Add an item x to rear of queue.
dequeue(x) : Remove an item x from front of queue.
empty() : Checks if a queue is empty or not. [BL: Apply| CO: 2|Marks: 7]

MODULE – III

3. (a) Differentiate between creation of singly linked list node and double linked list node. Implement
double ended queue (DEQUE) using circular doubly linked list.
[BL: Understand| CO: 3|Marks: 7]
(b) Develop a GetNth() function that takes a linked list, an integer index and returns the data value
stored in the node at that index position.
Example: Input: 1->10->30->14, index = 2
The node at index 2 is 30. [BL: Apply| CO: 3|Marks: 7]

4. (a) Write a function to implement circular singly linked list operations.


i) Insert a node at beginning
ii) Delete a node at end [BL: Understand| CO: 4|Marks: 7]
(b) Convert the following infix expression into postfix expression
a + b * c - (d / e + f * g * h) [BL: Apply| CO: 4|Marks: 7]

Page 1 of 2
MODULE – IV

5. (a) Explain spanning tree and minimum spanning tree. Write pseudocode to find minimum
spanning tree using Kruskal’s algorithm with example. [BL: Understand| CO: 5|Marks: 7]
(b) Write recurssive algorithms for the given tree in Figure 1 and give
i) Inorder traversal ii) Preorder traversal iii) Postorder traversal
[BL: Apply| CO: 5|Marks: 7]

Figure 1

6. (a) Outline the following with example i) Strictly binary tree ii) Skewed binary tree iii) Complete
binary tree [BL: Understand| CO: 5|Marks: 7]
(b) Give the depth first traversal (DFS) for the following graph given in Figure 2.
[BL: Apply| CO: 5|Marks: 7]

Figure 2

MODULE – V

7. (a) Mention the properties of binary search tree (BST). Discuss the AVL tree rotaion techniques
with example. [BL: Understand| CO: 6|Marks: 7]
(b) A phone book is stored in a text file, containing names of people, their city names and phone
numbers. Write a Python program by choosing an appropriate data structure to search a person’s
phone number based on his/her first name and city. [BL: Apply| CO: 6|Marks: 7]
8. (a) Summarize about hashing. Describe the collision resolution techniques separate chaining and
open addressing with suitable examples. [BL: Understand| CO: 6|Marks: 7]
(b) Consider a hash function as “key mod 7” and sequence of keys as 50, 700, 76, 85, 92, 73, 101
using separate chaining. Also write the advantages of separate chaining.
[BL: Apply| CO: 6|Marks: 7]

−◦◦ ◦◦−

Page 2 of 2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy