In computer science, a heap is a type of tree (data structure) that satisfies the heap property. Heaps are useful when you need to remove the item with the highest (or lowest) value. A common implementation of a heap is the binary heap in which the tree is a complete binary tree.