| 1. | a group of things placed, thrown, or lying one on another; pile: a heap of stones. |
| 2. | Informal. a great quantity or number; multitude: a heap of people. |
| 3. | Slang. an automobile, esp. a dilapidated one. |
| 4. | to gather, put, or cast in a heap; pile (often fol. by up, on, together, etc.). |
| 5. | to accumulate or amass (often fol. by up or together): to heap up riches. |
| 6. | to give, assign, or bestow in great quantity; load (often fol. by on or upon): to heap blessings upon someone; to heap someone with work. |
| 7. | to load, supply, or fill abundantly: to heap a plate with food. |
| 8. | to become heaped or piled, as sand or snow; rise in a heap or heaps (often fol. by up). |
| 9. | all of a heap, Informal.
|

heap
|
heap
1.
Heap is required by languages in which functions can return arbitrary data structures or functions with free variables (see closure). In C functions malloc and free provide access to the heap.
Contrast stack. See also dangling pointer.
2.
Formally, a heap is a binary tree with a key in each node, such that all the leaves of the tree are on two adjacent levels; all leaves on the lowest level occur to the left and all levels, except possibly the lowest, are filled; and the key in the root is at least as large as the keys in its children (if any), and the left and right subtrees (if they exist) are again heaps.
Note that the last condition assumes that the goal is finding the minimum quickly.
Heaps are often implemented as one-dimensional arrays. Still assuming that the goal is finding the minimum quickly the invariant is
heap[i] <= heap[2*i] and heap[i] <= heap[2*i+1] for all i,
where heap[i] denotes the i-th element, heap[1] being the first. Heaps can be used to implement priority queues or in sort algorithms.
(1996-02-26)
Heap
When Joshua took the city of Ai (Josh. 8), he burned it and "made it an heap [Heb. tel] for ever" (8:28). The ruins of this city were for a long time sought for in vain. It has been at length, however, identified with the mound which simply bears the name of "Tel." "There are many Tels in modern Palestine, that land of Tels, each Tel with some other name attached to it to mark the former site. But the site of Ai has no other name 'unto this day.' It is simply et-Tel, 'the heap' par excellence."