heap sort


A sorting algorithm that works by first organizing the data to be sorted into a special type of binary tree called a heap. The heap itself has, by definition, the largest value at the top of the tree, so the heap sort algorithm must also reverse the order. It does this with the following steps:

1. Remove the topmost item (the largest) and replace it with the rightmost leaf. The topmost item is stored in an array.

2. Re-establish the heap.

3. Repeat steps 1 and 2 until there are no more items left in the heap.

The sorted elements are now stored in an array.

A heap sort is especially efficient for data that is already stored in a binary tree. In most cases, however, the quick sort algorithm is more efficient.

Read Also:

  • heap

    (1) In programming, an area of memory reserved for data that is created at runtime — that is, when the program actually executes. In contrast, the stack is an area of memory used for data whose size can be determined when the program is compiled. (2) A special type of binary tree in which the […]

  • Heat Sink

    A component designed to lower the temperature of an electronic device by dissipating heat into the surrounding air. All modern CPUs require a heat sink. Some also require a fan. A heat sink without a fan is called a passive heat sink; a heat sink with a fan is called an active heat sink.Heat sinks […]

  • heat spreader

    An external casing usually made from aluminium or copper that is designed to cover an electronic device and dissipate heat. In overclocking terms, a heat spreader usually will refer to the casing used for memory.

  • helical-scan cartridge

    A type of magnetic tape that uses the same technology as VCR tapes. The term helical scan usually refers to 8mm tapes, although 4mm tapes (called DAT tapes) use the same technology. The 8mm helical-scan tapes have data capacities up to 40GB.

  • help desk

    A department within a company that responds to user’s technical questions. Most large software companies have help desks to answer user questions. Questions and answers can be delivered by telephone, e-mail, BBS, or fax. There is even help desk software that makes it easier for the people running the help desk to quickly find answers […]


Disclaimer: heap sort definition / meaning should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. All content on this website is for informational purposes only.