U.S.N.
B.M.S. College of Engineering, Bengaluru-560019
Autonomous Institute Affiliated to VTU
January / February 2025 Semester End Main Examinations
Programme: B.E. Semester: VI
Branch: Computer Science and Engineering Duration: 3 hrs.
Course Code: 22CS6PEADS Max Marks: 100
Course: Advanced Data Structures
Instructions: 1. Answer any FIVE full questions, choosing one full question from each unit.
2. Missing data, if any, may be suitably assumed.
UNIT - I CO PO Marks
Important Note: Completing your answers, compulsorily draw diagonal cross lines on the remaining blank
1 a) Show the result of the following sequence of instructions: union CO1 PO1 6
(1,2), union(3,4), union(3,5), union(1,7), union(3,6), union(8,9),
union(1,8), union(3,10),union (3,11), union(3,12), union(3,13),
union(14,15), union(16,0), union(14,16),union (1,3), union(1, 14)
when the unions are performed by height.
b) List advantages and disadvantages for the following self- CO2 PO2 6
organizing lists:
pages. Revealing of identification, appeal to evaluator will be treated as malpractice.
i) Move to Front Method
ii) Transpose Method
c) Write a C code for implementation of memory efficient doubly CO1 PO1 8
linked list.
OR
2 a) Demonstrate and show the contents of the Skip list after inserting CO1 PO1 10
the following sequence of elements:
➢ 21 with level 0
➢ 43 with level 3
➢ 76 with level 0
➢ 16 with level 2
➢ 26 with level 0
➢ 251 with level 2
➢ 98 with level 3
➢ 87 with level 0
➢ 79 with level 1
After the skip list is constructed, perform the following deletes and
update the list. Show steps clearly.
I. Delete 16
II. Delete 79
b) Demonstrate the usage of Unrolled linked list. List its advantages CO1 PO1 10
and disadvantages.
UNIT - II
3 a) Show the AVL tree that results after each of the integer keys: 9, CO1 PO1 10
27, 50, 15, 2, 21, and 36 are inserted, in that order, into an initially
empty AVL tree.
b) Show that every AVL tree can be colored as a Red-Black tree. Are CO2 PO2 4
all Red-Black trees AVL?
c) List the properties of 2-3 trees with example. CO1 PO1 6
OR
4 a) What is the significance of the 'α' parameter in a Scapegoat Tree? CO1 PO1 4
How does it affect the tree's structure and performance?
b) Show the result of accessing the key 5 in order in the Splay tree in CO2 PO2 8
below Figure. Analyse how splay tree is better in practical
situation.
c) Demonstrate with suitable example various rotations on Red- CO3 PO3 8
Black trees.
UNIT - III
5 a) Analyze and compare the efficiency of Tries, Suffix tree and CO2 PO2 6
Suffix arrays.
b) Draw the Suffix tree for S = ABAAB$. CO1 PO2 7
c) Given an array A=[1,3,5,7,9,11], design a segment tree to support CO1 PO1 7
efficient range sum queries.
OR
6 a) Construct a Fenwick Tree for the following array {3,2,-1,5,7,- CO1 PO1 9
3,2,1}. Also show how the sum from 0 to 6 is computed.
b) Consider following points in a 2-D plane: (3, 6), (17, 15), (13, 15), (6, CO1 PO1 7
12), (9, 1), (2, 7), (10, 19), construct a K-D tree.
c) Compare the efficiency of finding the minimum value in a k-d CO2 PO2 4
tree versus a balanced binary search tree.
UNIT - IV
7 a) Construct a Hash table for the following numbers {20, 50, 53,75, CO1 PO1 10
100, 67, 105, 3, 36, 39} using Cuckoo hashing technique.
b) What strategies are used to maintain the neighborhood property CO2 PO2 10
during insertions and deletions? Analyze the efficiency of these
strategies in minimizing collisions and maintaining performance.
OR
8 a) Demonstrate Perfect hashing with an example. CO1 PO1 10
b) Apply Hopscotch hashing and construct the hash table for the CO1 PO1 10
following set of elements:
{151,61,23,47,189,79,101,12,31,145,89,132}.
Assume neighborhood=4. List the advantages of Hopscotch
hashing.
UNIT - V
9 a) Discuss the properties of Binomial Tree. CO1 PO1 6
b) Show the result of performing three ExtractMin operations in the CO1 PO1 10
Binomial heap in the below figure:
c) Can both insert and findMin be implemented in constant time in CO2 PO2 4
Binomial Heap? Justify.
OR
10 a) Demonstrate the various operations performed on Binomial Heap CO3 PO1 10
with an example.
b) Explain with an example Decreasing key operation in the CO3 PO1 10
Fibonacci Heap with an example.
******