0% found this document useful (0 votes)
2 views4 pages

Ads Mse2 QP

Uploaded by

er.cse
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)
2 views4 pages

Ads Mse2 QP

Uploaded by

er.cse
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/ 4

URR-18 Write your Roll number

KAKATIYA INSTITUTE OF TECHNOLOGY & SCIENCE, WARANGAL


(An Autonomous Institute under Kakatiya University, Warangal)
FACULTY OF ENGINEERING AND TECHNOLOGY
B. Tech. (CSE/IT/CSE(N)) III Semester
Mid Semester Examination – II

U18CS306R22/U18IT303R22/U18AI306R22/U18CN306R22/U18IN306R22: ADVANCED DATA STRUCTURES

Time: 2 Hours] [Max. Marks : 30


Date:07.12.2022
Note: Answer all the questions.

1. a. List the min heap properties and insert the element ‘2’ into the [1] R CO3
following given min heap tree without violating min heap property.

b. How many ways a pivot element can be selected in the quick sort and [1] U CO3
also give the scenario for worst case time complexity of quick sort?
c. Illustrate the elementary intervals and sub-intervals for the given pair [1] U CO3
of integers a, b, c, d? Interval is a pair of integers [a, b] and [c, d] where
a= 10, b= 20, c= 15 and d= 25.
d. Explain Log-Structured-Merge (LSM) tree and find whether it is used [1] U_CRP CO4
for efficient range queries. If yes, Justify your answer.
e. Define directed and undirected graph? Give example for each of the [1] R CO4
graph.
f. Write the output for the given text using run length encoding? [1] U CO4
AAABBCCCCD

2. a. Choose the given array and find the element 50 using Fibonacci [4] Ap CO3
search? Construct the fibonacci numbers and show the last fibonacci
number considered for the given example. Give an algorithm for
Fibonacci search.
[i] 1 2 3 4 5 6 7 8 9 10 11
ar[i] 10 22 35 40 45 50 80 82 85 90 100
b. Develop the C code to sort elements using quick sort. Quick sort creates [4] Ap CO3
two arrays to hold elements less than the pivot element to left of pivot
& the elements greater than the pivot element to right of pivot and
then recursively sort the sub-arrays.

Course Coordinator Signature with Date:


Page 1 of 4
(OR)
c. Develop an algorithm for heap sort? Heap sort is a comparison-based [4] Ap CO3
sorting technique based on Binary Heap data structure. The concept of
heap sort is to eliminate the elements one by one from the heap part of
the list, and then insert them into the sorted part of the list.
d. Make use of bitonic sequence and give the conditions to apply bitonic [4] Ap CO3
sort. Can we apply bitonic sequence on following numbers? If yes
apply bitonic sort on following numbers.
36, 46, 66, 86, 68, 50, 46, 26.

3. a. Build the minimum spanning tree using Prim’s algorithm and start [4] Ap CO4
with vertex 10 as the starting node. Give the order in which nodes are
visited and also calculate the minimum total weight.

b. Examine the string and the pattern given below. Apply Knuth Morris [4] An CO4
Pratt algorithm and analyze the time complexity for it.
String: a b c a b c d a b a b c d a b c d a b d e
Pattern: a b c d a b d
(OR)
c. Make use of Kosaraju’s algorithm and find strongly connected [4] Ap CO4
components of graph. Also find whether the given graph is strongly
connected graph.

d. Compare the Breadth First Search (BFS) and Depth First Search (DFS) [4] An CO4
in terms of the data structure used for the given graph.

Course Coordinator Signature with Date:


Page 2 of 4
4. a. Organize the following words into the Trie data structure? After [4] Ap CO3
inserting the words delete Man and Onion.
Apple
Banana
Orange
Mango
Apricot
Blueberry
Ball
Baloon
Onion
Man
b. Apply Kruskal’s algorithm to find the minimum spanning tree by [4] Ap CO4
considering minimum cost of edges for each vertex of a given graph?

(OR)
c. Develop the C program for Merge sort. The Merge sort algorithm is a [4] Ap CO3
sorting algorithm that is based on the Divide and Conquer paradigm.
In this algorithm, the array is initially divided into two equal halves
and then they are combined into a sorted manner.
d. Make use of adjacency matrix, adjacency list and simple graph to [4] Ap CO4
represent the following graph.

Course Coordinator Signature with Date:


Page 3 of 4
--- Question Paper Ends ---

Paper set by:

Faculty Name Signature Faculty Name Signature


Dr. Y. Bhavani B. Sridhara Murthy
M. Kishore V. Gouthami
Dr. A. Godavari R. Radhika
M. Hithasri Dr. M. Srinivas

Course Coordinator Signature with Date:


Page 4 of 4

You might also like