Heaps
https://en.wikipedia.org/wiki/Min-max_heap
Min-max heap - Wikipedia
In computer science, a min-max heap is a complete binary tree data structure which combines the usefulness of both a min-heap and a max-heap, that is, it provides constant time retrieval and logarithmic time removal of both the minimum and maximum elements
en.wikipedia.org
https://www.cs.cmu.edu/~adamchik/15-121/lectures/Binary%20Heaps/heaps.html
Heaps
Binary Heaps Introduction A binary heap is a complete binary tree which satisfies the heap ordering property. The ordering can be one of two types: the min-heap property: the value of each node is greater than or equal to the value of its parent, with the
www.cs.cmu.edu
https://stackoverflow.com/questions/24801613/max-heapify-a-binary-tree
Max-Heapify A Binary Tree
This is one of the interview questions I recently came across. Given the root address of a complete or almost complete binary tree, we have to write a function to convert the tree to a max-heap.
stackoverflow.com