Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. (a) Each class has some special member-functions, which calls can be inserted by the compiler
into a code without explicit instruction of the programmer. Enumerate such functions,
members and cases, when implicit calls can arise.
(b) If when creating a variable the programmer explicitly did not initialize it, in some cases,
the compiler itself would give it a certain, predefined initial value, and in some cases the
initial value would be unpredictable. What does it depend on? [8+8]
2. (a) Define inheritance? Explain about the access control mechanism in Inheritance in C++?
(b) Write a program to illustrate the concept of hierarchical Inheritance? [8+8]
4. (a) What is a Sparse Matrix? Explain about the linear list representation of a sparse matrix?
(b) Write a C++ program to implement addition of two sparse matrices? [8+8]
5. (a) What is skip list representation of dictionary? Write the structure to represent node in a
skip list. What are the data members to be included in the class skipList.
(b) Write a method in C++ to search a skip list and save the last node encountered at each
level. [8+8]
6. Define an AVL tree? Write the procedures to perform insertion, deletion in an AVL tree? [16]
?????
Code No: R7210503 2
II B.Tech I Semester(R07) Supplementary Examinations, May 2009
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
?????
2. (a) Explain about operator overloading? Explain the rules to be followed on overloading the
operators?
(b) Explain about the function overriding with suitable examples. [8+8]
4. Write code for a method reverse which reverses the order of the elements in the list. Do the
reversal in place and do not allocate any new nodes. [16]
5. What is Hashing? Explain the different Hash table representations in detail? [16]
6. (a) What is an AVL search tree? How do we define the height of it? Explain about the
balancef actor associated with a node of an AVL tree.
(b) Explain how an AVL tree can be used to sort a sequence of n elements in O (n log n) time.
[8+8]
7. (a) Prove that the insertion of a new node in a red-black tree with n nodes in θ (logn) time
in the worst case.
(b) Derive the amortized complexity of a find, insert or delete operation performed on a splay
tree with n elements. [8+8]
?????
Code No: R7210503 3
II B.Tech I Semester(R07) Supplementary Examinations, May 2009
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
?????
2. What is template? Explain about function templates and class templates with suitable exam-
ples. [16]
3. (a) What are some ways try / catch / throw can improve software quality?
(b) How can we handle a constructor that fails?
(c) How can we handle a destructor that fails. [5+5+6]
4. (a) Define a sparse matrix? Explain its representation? Write the program that gives the
header for the class sparse Matrix which uses row major mapping of a sparse matrix into
an arrayList.
(b) Write the methods get (theRow, the Column) and set (theRow, theColumn, the-
Value) for a sparse matrix. [10+6]
5. (a) What is a dictionary? Define the abstract data type for it? Write the abstract class for
the dictionary?
(b) Give the applications of dictionary or dictionary with duplicates in which sequential access
is desired. [8+8]
7. (a) Prove that the insertion of a new node in a red-black tree with n nodes in θ (logn) time
in the worst case.
(b) Derive the amortized complexity of a find, insert or delete operation performed on a splay
tree with n elements. [8+8]
?????
Code No: R7210503 4
II B.Tech I Semester(R07) Supplementary Examinations, May 2009
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
?????
2. (a) Explain about operator overloading? Explain the rules to be followed on overloading the
operators?
(b) Explain about the function overriding with suitable examples. [8+8]
3. What is the difference between the C++ standard library, and the C++ standard template
library? [16]
4. Write a C++ program to determine whether or not a character string has an unmatched
parenthesis? [16]
5. (a) What is the structure to represent node in a skip list. Write the constructor for skipList.
(b) Write a method in C++ to find a pair with key theKey in a dictionary using skip list
representation? What is its complexity? [8+8]
6. (a) Write a method to delete the pair with the largest key from a Binary Search Tree.
(b) Write a method to find the height of a Binary Search Tree? [8+8]
8. (a) Explain the construction of the kmp flow chart with an example.
(b) Explain the search engines. [10+6]
?????