1. Write a procedure for Heap-Sort2. Write the upward and downward build-heap algorithms for an arbi-trary array of integers.3. Write code for heapify, which assumes that the two subtrees rootedat the children of a node are heaps, and extends the heap property toinclude the node of reference.4. Write a procedure to extract the minimum element from a min heapand restore the heap property among the remaining elements.5. Write a routine to add an extra element into an existing heap. Thisshould increase the heapsize by 1 and then incorporate the new ele-ment.6. Write a routine for restoring the heap property when the key value ata node is altered.7. Write code for finding the parent and child indices for a k-ary heap.8. Write a program to build a treap from a given set of ordered pairvalues.9. Write a program to buils an alternating heap of n elements.
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.