Data Structure Internal2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CP3151 DATA STRUCTURES AND ALGORITHMS

ASSESSMENT 2

Time 90 Minutes Max Marks 50

Answer ALL Questions

PART A (5 x 2 = 10)

1. What is the property of a splay tree? What is the benefit of that?

2. How a new value is inserted in a deap?

3. Compare the leftist heaps and binomial heaps.

4. What kind of problems are said to be NP problems? Give examples.

5. What is the role of reduction algorithms in finding solutions for NP


Complete problems?

PART B (5 x 8 = 40)

6. State the properties of a Red Black tree and construct a Red Black tree for
the list of values 10, 20, 15, 23, 17, 45, 32, 11, 19, 48.

7. Generate leftist heap for the values 7, 3, 10, 6, 9, 4, 2, 11, 12, 1, 5, 15,
19, 13, 8 by inserting one value at a time.

8. What are binomial heaps? Explain the construction of the binomial heaps
with algorithm and an example.

9. Describe the vertex cover problem and prove that it is NP Complete.

10.Explain the reduction algorithm for reducing an instance of the vertex-


cover problem to an instance of the Hamiltonian cycle problem.

You might also like