JNTU question papers B -Tech I Semester Supplimentary Examinations, Advanced data structure – November 2008

JNTU II B.Tech I Semester Supplimentary Examinations, November 2008

ADVANCED DATA STRUCTURE

( Common to Computer Science & Engineering and Electronics &

Computer Engineering) SET-1

 

1. (a) Can you think of a situation where your program would crash without reaching the breakpoint which you set at the beginning of main?

(b) When are copy constructors called?

(c) Can a copy constructor accept an object of the same class as parameter, instead of reference of the object?

 

2. What is template? Explain about function templates and class templates with suitable examples.

 

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.

 

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,

theValue) for a sparse matrix.

 

5. (a) What is Linear Probing? Write a C++ program that gives the data members and constructors for the hash table class that uses linear probing.

(b) Write the C++ program that gives the method search of a hash table.

 

6. Define a Red-Black tree? Write the procedures to perform insertion, deletion in a Red-Black tree?

 

7. (a) Describe deletion operation of a B-tree with an example.

(b) Prove that the height of a red black tree storing n items is O(logn).

 

8. (a) Describe about search engine and inverted files.

(b) Explain the main features of Boyer-Moore algorithm.

 

 

Leave a Comment