Heap has important property if it max heap then parent always greater than or equal to its two child... dont matter lest or right child in any oder..
and one important property if left child present then only right present ... i.e. it is not the case right child present but left child not present...
if it min heap then parent always less than or equal to its two child..
Heap stored in array as
Parent then left child then right child.. then left child as root then its left chils then right child.....
if any place some thing mis then vacant thats place in array..