0% found this document useful (0 votes)
46 views2 pages

G4001042014

The document contains a practice exam for an Advanced Data Structures course. It includes 8 questions covering topics like stack implementation with linked lists, graph representations, binary trees, binary search trees, AVL trees, heaps, hash tables, and red-black trees. Students are asked to draw and manipulate various data structures, perform operations like insertion and deletion, and analyze time and space complexities.
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)
46 views2 pages

G4001042014

The document contains a practice exam for an Advanced Data Structures course. It includes 8 questions covering topics like stack implementation with linked lists, graph representations, binary trees, binary search trees, AVL trees, heaps, hash tables, and red-black trees. Students are asked to draw and manipulate various data structures, perform operations like insertion and deletion, and analyze time and space complexities.
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

Subject Code: G4001/R13

M. Tech –I Semester Regular Examinations, March, 2014

ADVANCED DATA STRUCTURES/


DATA STRUCTURES/
ADVANCED DATA STRUCTURES ALGORITTHUM ANALYSIS
(Com to IT, CS&T, CS and CS&E)
Time: 3 Hours Max Marks: 60
Answer any FIVE questions
All questions carry EQUAL marks
****
1. Create a stack by linked list implementation. Read a list of integers and print them in
reverse order.

2. What are the common structures used to store graphs? Explain with examples.

3. a) Draw a complete tree to level 4. How many different nearly complete trees can
exist at level 4?
b) Show the breadth first traversal of the tree in the following figure.

B F

C G

H I
D E

4. Use linear probing , a hash table with b=13 buckets, and the hash function f(k)= k% b.
Start with the empty hash table and insert pairs whose keys are 7, 42, 25, 70, 14, 38,
8, 21, 34, 11.

i) Draw the hash table following each insert.

ii) What is the maximum and average number of buckets examined in an


unsuccessful search of your table?

iii) What is the maximum and average number of buckets examined in a


successful search of your table?

iv) What is the loading factor of your table after the last insert?

1 of 2

www.ManaResults.co.in
|''|''|||''|'''|||'|
Subject Code: G4001/R13

5. Consider the array theHeap= { -, 10, 2, 7, 6, 5, 9, 12, 35, 22, 15, 1, 3, 4}

i) Draw the corresponding binary tree.

ii) Heapify the tree. Show the result in both tree and array format.

iii) Insert the elements 15, 20 and 45 using bubbling up process. Show the max
heap following each insert.

6. Construct a binary search tree by inserting the keys 4, 12, 8, 16, 6, 18, 24, 2, 14, 3.
Draw the tree following each insert. From the tree delete keys 6, 14, 16 and 4. Draw
the search tree after each deletion.

7. a) Describe LL rotation, LR rotation in an AVL tree by considering an example.

b) Describe Single rotation and double rotation in deleting an element in an AVL tree.

8. Start with an empty red black tree and insert the following keys in the given order: 20,
10, 5, 30, 40, 57, 3, 2, 4, 35, 25, 18, 22, 21. Draw the figures depicting your tree
immediately after insertion and following the rebalancing rotation or color change.
Label all nodes with their color and identify the rotation type.

****

2 of 2

www.ManaResults.co.in
|''|''|||''|'''|||'|

You might also like