[SOLVED] SOLVED:Assignment 3

20.99 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

Rate this product

1. Write a procedure for Heap-Sort
2. 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 rooted
at the children of a node are heaps, and extends the heap property to
include the node of reference.
4. Write a procedure to extract the minimum element from a min heap
and restore the heap property among the remaining elements.
5. Write a routine to add an extra element into an existing heap. This
should 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 at
a 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 pair
values.
9. Write a program to buils an alternating heap of n elements.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.