Documentos de Académico
Documentos de Profesional
Documentos de Cultura
com
Set No. 1
1. (a) What should be placed inside a try block? Give the syntax.
(b) Write a program to implement the use of try block.
[8+8]
D
L
R
O
[8+8]
[8+8]
W
U
(c) What are the operations performed on dictionary? Explain them in detail.
[3+5+8]
T
N
5. What is priority queue? What are the applications of priority queue? How do you
implement a priority queue using Heap?
[16]
6. (a) How do you represent an AVL tree.
[4+4+8]
7. (a) When do you use recursive approach as part of Divide and Conquer. Explain
it with example.
(b) When do you stop splitting a problem into sub problems. Explain.
[10+6]
8. Prove that kruskals algorithm generates a minimum cost spanning tree for every
connected undirected graph.
[16]
1 of 1
www.jntuworld.com
www.jntuworld.com
Set No. 2
D
L
R
O
3. (a) Write the insertion routine for linked list and explain.
(b) Write the deletion routine for linked list and explain.
W
U
[8+8]
[8+8]
5. Explain in detail how Heap sort algorithm works with the help of an example. [16]
T
N
6. Insert the following in to AVL tree in the sequence: march, may , nov, august,
april, january, december, july, february, june, october, september.
[16]
[10+6]
8. (a) How do you measure the performance of an algorithm for constructing Optimal
Binary search tree.
(b) Write an algorithm to construct Optimal Binary search tree given the
root r(i,j), 0 <= j <= n.
[6+10]
1 of 1
www.jntuworld.com
www.jntuworld.com
Set No. 3
D
L
2. (a) What does inheritance mean in C++? What are the benefits of inheritance?
(b) What are the different forms of inheritance? Give an example for each. [8+8]
R
O
(b) Explain about the additional factors that may influence the space complexity
of a program.
[8+8]
W
U
T
N
[3+8+5]
[16]
7. (a) How many comparisons are made by Binary search for a successful search and
for an unsuccessful search. Explain.
(b) Consider the list of elements: -15, -6, 0, 7, 9, 23, 54, 82, 101, 112, 125, 131,
142, 151. Trace the Binary search algorithm ser4aching for elements 151, -14,
9 respectively.
[8+8]
8. Dynamic programming often drastically reduces the amount of enumeration by
avoiding the enumeration of some decision sequences that can not possibly be optimal. Explain.
[16]
1 of 1
www.jntuworld.com
www.jntuworld.com
Set No. 4
D
L
R
O
(d) Write a program that shows the implementation of virtual base class. [3+3+3+7]
3. (a) Discuss the number or multiplications done by function called Multiplication
which multiplies an M N and an N P matrix.
W
U
(b) Compare the worst case number of elements moves made by functions in
Selection sort and Insertion sort. Compare the relative performance. [8+8]
4. (a) What are the problems associated with Quadratic Probing?
T
N
[8+8]
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.
[10+6]
[16]
[8+8]
1 of 1
www.jntuworld.com