implementing heaps

Implementation and Merging of Heaps

Implementation Heaps of n keys can be represented by array of length n+1(Fig 2).For a node at rank i ,the left child is at rank 2i +1 and the right child is at rank  2i +2.The links between nodes are not stored explicitly. In Fig 1,heap has 7 keys i.e n =7. Array will be… read more »