You are on page 1of 1

Code No.

: R5210503

R5

II B.Tech I Semester (R05) Supplementary Examinations, November/December 2011

ADVANCED DATA STRUCTURES ( Common to Computer Science & Engineering and Electronics & Computer Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks

1. (a) What is a reference? what happens if you assign to a refernce?What happens if you return a reference? (b) What does object.method1().method2() mean? (c) How can you reseat a reference to make it refer to a dierent object? (d) When should I use references, and when should I use pointers? (e) What is a handle to an object? Is it a pointer? Is it a reference? Is it a pointer-to-a- pointer? What is it? [3+3+3+3+4] 2. (a) What is multilevel inheritance? Write a program to illustrate the concept of Multilevel Inheritance. (b) What is Hybrid inheritance? Write a program to illustrate the concept of Hybrid Inheritance. [8+8] 3. Create a program that opens a le (the rst argument on the command line) and searches it for any one of a set of words (the remaining arguments on the command line). Read the input a line at a time, and print out the lines (with line numbers) that match. [16] 4. (a) Explain Heap Sort technique to sort a given set of elements. (b) Consider the array -5, 7, 2, 9, 3, 8, 6, 1. Show how the array can be sorted using heap sort? Draw the complete binary tree then the heap tree and the state of the tree after each removal from max heap. [8+8] 5. What is Hashing? Explain the dierent Hash table representations in detail? [16] 6. What is a Binary search tree? Provide a specication for the abstract data type BSTree(binary search tree with duplicates). Dene a C++ abstract class that corresponds to this ADT. Write a program to insert a pair into a binary search tree. [16] 7. (a) What is Splay tree? Explain the operations of Splay tree with an example. (b) Give the properties of red black tree. 8. (a) Describe about search engine and inverted les. (b) Explain the main features of Boyer-Moore algorithm. [10+6] [10+6]

1 of 1

You might also like