// leaf checks whether index is a leaf.
leaf checks whether index is a leaf.
// leaf checks whether index is a leaf .
func (h *Heap) leaf(index int) bool {
	if index >= (h.size/2) && index <= h.size {
		return true
	}
	return false
}
func ( h * Heap ) leaf ( index int ) bool { if index >= ( h . size / 2 ) && index <= h . size { return true } return false }
leaf checks whether index is a leaf.
leaf checks whether index is a leaf .