leftist heap

A "leftist heap" is a data structure that is used to efficiently store and manipulate a collection of elements. It is a variant of the binary heap data structure, where each node contains a key value and a rank value. The rank value represents the shortest path from the node to a leaf in the heap. The key property of a leftist heap is that the rank of any left child is always greater than or equal to the rank of its right sibling. This property ensures that the smallest key value is always stored at the root of the heap. The leftist heap is often used in priority queue applications, as it provides efficient operations for insertion, deletion, and merging of heaps.

Requires login.