A min heap is a
binary tree in which the value of each node is less than or equal to the values of its children.
node of the tree is the node with the minimum value.
Min heaps are often used to
priority queues where the element with the smallest value is always at the root of the heap
of a node in a min heap implemented as an array are located at indices 2i+1 and 2i+2
such as insertion and removal can be performed in logarithmic time
A min heap can be
to a sorted array by repeatedly removing the root node and placing it at the end of the array
The min heap property is used in several
, such as Dijkstra's algorithm for finding shortest paths
Sorting in data structure