Min-Max-Heap

A min-max heap is in computer science, a tree data structure

Min-max heaps are derived from binary heaps, and are used to double-ended priority queues to implement efficiently. Here, both the smallest ( findMin ) and the largest ( FindMax ) element can be found in constant time. The restructuring of the tree after the removal ( or extractMin extractMax ), or insertion (insert ) of elements is possible in logarithmic time.

Min-Max Heaps differ from Min- Max Heaps Heaps or: The nodes of the min-max heaps are arranged according to the so-called min -max principle. The tree is subdivided into even and odd levels. In the even levels there are nodes that are smaller than all of its child nodes. Accordingly, located in the odd levels only nodes whose child nodes are smaller than themselves. In the root ( level 0 ) thus is the smallest element of the entire heap. The largest element is found in the right or left child node of the root.

573752
de