Heap is a data structure that obeys the heap property. Heap property sets some restrictions on the relationship between the parent node and child nodes. In a Min Heap the key value of every parent node must be less than or equal to the key value of its child nodes. In a Max Heap the key value of every parent node must be greater than or equal to the key value of its child nodes. The program is to create a max heap from a list of numbers.
Identifying the Left and Right Child nodes |
The Tree Representation of the Max Heap |
Click here to download the C Program to construct a Max Heap.
Click here to download the C++ Program to construct a Max Heap.
Click here to download the C++ Program to construct a Max Heap.
thanx
ReplyDeletegood job
ReplyDeleteThank you very much :)
ReplyDeleteThank for understanding in easy way
ReplyDelete