# heap meaning

[ hi:p ] Pronunciation: "heap" in a sentence

**Noun:**

**heap**heep

- A collection of objects laid on top of each other

- pile, mound, agglomerate, cumulation, cumulus - (often followed by 'of') a large number or amount or extent

- batch, deal, flock, good deal, great deal, hatful, lot, mass, mess, mickle [archaic], mint, mountain, muckle, passel [US], peck, pile, plenty, pot, quite a little, raft, sight, slew, spate, stack, tidy sum, wad - A car that is old and unreliable

- bus, jalopy, banger [Brit], hooptie [US], clunker [N. Amer]

**Verb:**

**heap**heep

- Bestow in large quantities
*"He heaped him with work"; "She heaped scorn upon him"* - Arrange in stacks
*"heap firewood around the fireplace"*

- stack, pile - Fill to overflow
*"heap the platter with potatoes"*

**Derived forms: **heaps, heaped, heaping

**See also: **heap up

**Type of: **accumulation, aggregation, arrange, assemblage, auto, automobile, car, collection, dysphemism, fill, fill up, give, large indefinite amount, large indefinite quantity, machine, make full, motorcar, set up

**Encyclopedia:** Heap

[American slang]

**n.**an old car.

*• I've got to get my heap fixed up.*

*• Is this old heap yours?*

[British slang]

Noun. A thing that is old and delapidated. Often a vehicle.

[Computer]

1. <

*programming*> An area of memory used for dynamic memory allocation where blocks of memory are allocated and freed in an arbitrary order and the pattern of allocation and size of blocks is not known until run time. Typically, a program has one heap which it may use for several different purposes.

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. <

*programming*> A data structure with its elements partially ordered (sorted) such that finding either the minimum or the maximum (but not both) of the elements is computationally inexpensive (independent of the number of elements), while both adding a new item and finding each subsequent smallest/largest element can be done in O(log n) time, where n is the number of elements.

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 <= heap and heap <= heap for all i,where heap denotes the i-th element, heap being the first. Heaps can be used to implement priority queues or in sort algorithms.

- heap on: heap on ! Heap upo ...
- in a heap: [American slang]mo ...
- a heap of sth: [American slang]a ...

## Examples

More: Next- the tower collapsed in a
*heap*of ruin. - the burnt
*heaps*of wood were still fuming. - the
*heap*of stones was put into the truck. - i'd
*heap*rather die than go there any day. - she did not shuffle them to a
*heap*.