Heap order
= Heap order
{title2=$A_{\lfloor(i-1)/2\rfloor}\le A_i\quad(1\le i<n)$}
The minimum convention for <heap order> requires every <parent in a rooted tree> to have priority no greater than each of its <children in a rooted tree>. The displayed formula uses the <array> representation of a <binary heap>. It permits equal priorities and does not require a <sorted array>; the maximum convention reverses the inequality.