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

1. (a) What is an exception specification? When it is used? Explain.

(b) When should a program throw an exception? Explain with an example.

 

2. (a) What is an abstract class?

(b) Why do we need abstract class?

(c) What are the rules for creating virtual base class?

(d) Write a program that shows the implementation of virtual base class.

 

3. (a) Discuss the number or multiplications done by function called Multiplication

which multiplies an M × N and an N × P matrix.

(b) Compare the worst case number of elements moves made by functions in

Selection sort and Insertion sort. Compare the relative performance.

 

4. (a) What are the problems associated with Quadratic Probing?

(b) How do you solve the problems of Quadratic Probing?

 

5. (a) Write the status of the list (12, 2, 16, 30, 8, 28, 4, 10, 20, 6, and 8) at the end

of each phase of Heap sort.

(b) Analyze the Heap sort.

 

6. Write algorithm for insertion in to B-tree. Explain it with examples.

 

7. (a) Run the Merge Sort algorithm on an array of elements:

(310,285,179,652,351,423,861,254,450,520).

(b) Compute the order of complexity of Merge Sort.

 

8. In Dynamic programming the optimal sequence of decisions is obtained by making

explicitly appeal to the principle of optimality. Explain.

 

Leave a Comment