01-19-2012, 02:46 PM
[B]Assignment No. 05
SEMESTER fall 2011
CS301- Data Structures
Question No.1 (5+5 Marks)
Consider the following array as input
13 4 6 8 9 7 10 15
I) Prove that it is a heap and also explain what type of heap it is.?
II) Add 16 and 3 into the heap and convert it into Max heap.
Question No: 2 Marks: 10
Perform the following sequence of Union operations on the set of elements {1,2,3,4,5,6,7,8,9,10,11} using Union by Size.
Union(1,2)
Union(3,5)
Union(3,6)
Union(1,4)
Union(3,9)
Union(10,11)
Union(1,10)
Union(7,8)
Union(10,7)
Union(1,3) .
[/B]
mileys20:
SEMESTER fall 2011
CS301- Data Structures
Question No.1 (5+5 Marks)
Consider the following array as input
13 4 6 8 9 7 10 15
I) Prove that it is a heap and also explain what type of heap it is.?
II) Add 16 and 3 into the heap and convert it into Max heap.
Question No: 2 Marks: 10
Perform the following sequence of Union operations on the set of elements {1,2,3,4,5,6,7,8,9,10,11} using Union by Size.
Union(1,2)
Union(3,5)
Union(3,6)
Union(1,4)
Union(3,9)
Union(10,11)
Union(1,10)
Union(7,8)
Union(10,7)
Union(1,3) .
[/B]
mileys20:
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
