Code No: RA210503 RA
III B.Tech I Semester Regular Examinations, November 2007
ADVANCED DATA STRUCTURE
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????
1. (a) What are the differences between a C++ struct and C++ class?
(b) What does extern “C” int func(int ∗, Foo) accomplish?
(c) How do you access the static member of a class?
(d) What are the access privileges in C++? What is the default access level?
[4+4+4+4]
2. (a) Explain the need for “Virtual Destructor”.
(b) Can we have “Virtual Constructors”? [8+8]
3. (a) Explain about try, catch, throw keywords in C++?
(b) Write a program to illustrate the exception handling mechanism in C++.
[8+8]
4. Define the Abstract data type for Stack. Write a C ++ program to implement
stack ADT using linked list. [16]
5. Develop a class for hash table using linear probing and neverUsed concept to handle
an erase operation. Write complete C++ code for all the methods. Include a
method to reorganize the table when (say) 60% of the empty buckets have never
used equal to false. The reorganization should move pairs around as necessary and
leave a properly configured hash table in which neverUsed is true for every empty
bucket. [16]
6. Define a class called binarySearchTree to represent a Binary search tree. Extend
this class by adding a public method outputInRange (Low,High) that outputs,
in ascending order of key, all elements in a binary search tree whose key lies between
Low and High. Use recursion and avoid entering sub trees that cannot possibly
contain any elements with keys in desired range. [16]
7. (a) Describe the B-trees? Explain the advantages of B-trees.
(b) Prove that let T be a red black tree with n interval nodes then no node has
depth greater than 2 log(n+1). [8+8]
P
8. (a) Explain the KMP flow chart for the pattern ’ABAABA’ where = {A, B, C}
(b) Explain the complexity of Brute Force pattern matching algorithm. [10+6]
?????
1 of 1