reset password
Author Message
msargent
Posts: 519
Posted 16:12 Jul 08, 2015 |

Could these be posted? I was wondering what sort of answer you were looking for. 

plakhan
Posts: 37
Posted 16:23 Jul 08, 2015 |

Refer to Figure 6.4 in chapter 6. You have to show the heapsort operations i.e Build the Max Heap and then sort it.

For problem 7: You have to write the psuedo code that shows the delete operation on min-heap.

HEAP-DELETE(A, i):
  A[i] = A[A.heap-size]
  A.heap-size -= 1
  MIN-HEAPIFY(A, i)
msargent
Posts: 519
Posted 17:17 Jul 08, 2015 |

 

This is quite a bit of drawing to do in under 5 minutes (give the time of the quiz and number of problems) and in the amount of space we had on the quiz. I thought we could do the process once and say "repeat." Answers like this are expected on the midterm?

plakhan
Posts: 37
Posted 17:24 Jul 08, 2015 |

Yes it can be on midterm and if it's there on midterm, then we will specify the exact steps that are required. We also understand that it is a lot of drawing in 5 mins time, but obviously such questions do have more weight age then other.

Last edited by plakhan at 17:25 Jul 08, 2015.