A binary heap is a heap data structure created using a binary tree. It can be seen as a binary tree with two additional constraints:
*The shape property: the tree is a complete binary tree; that is, all levels of the tree, except possibly the last one (deepest) are fully filled, and, if the last level of the tree is not complete, the nodes of that level are filled from left to right.
*The heap property: each node is greater than or equal to each of its children according to some comparison predicate which is fixed for the entire data structure.
"Greater than or equal to" means accordi...