 This idea can be generalised to a min-max-median heap.In an array-based heap, the children and parent of a node can be located via simple arithmetic on the node's index.This section derives the relevant equations for heaps with their root at index 0, with additional notes on heaps with their root at index 1.