Enter your search keyword(s):

Click to search our directories-AllWebHunt, Encyclopedic, TopChoice, Or Google, Alexa, About & Yahoo:

 

Untitled Document
Websites

Arts
Movies, Television, Music...

Business
Jobs, Industries, Investing...

Computers
Internet, Software, Hardware...

Games
Video Games, Role playing, Gambling...

Health
Fitness, Medicine, Alternative...

Home
Family, Consumers, Cooking...

Kids & Teens
Arts, School Time, Teen Life...

News
Media, Newspapers, Weather...

Recreation
Travel, Food, Humor...

Reference
Maps, Education, Libraries...

Science
Biology, Psychology, Physics...

Shopping
Autos, Clothing, Gifts...

Society
People, Religion, Issues...

Sports
Baseball, Soccer, Basketball...

Travel
Cruises, Destinations, Reservations...


Country directories
United States, United Kingdom, Europe...


Translated directories
Deutsch, Español, Français...


Articles

Nature

Astronomy, Biology, Chemistry, Earth science, Ecology, Geography, Physics

Society
Anthropology, Archaeology, Business, Communication, Economics, Government, History, Law, Linguistics, Politics, Psychology, Public affairs, Sociology, State

Technology
Agriculture, Architecture, Engineering, Internet, Transport, Vehicles

Abstraction
Computer science, Logic, Mathematics, Philosophy, Statistics

Culture
Arts and crafts, Dance, Entertainment, Films, Fine arts, Games, Hobbies, Humor, Language, Literature, Media, Music, Recreation, Religion, Sports, Television, Visual arts and design

Human
Education, Family, Food, Health, Housing, Medicine, Personal life

Edit | Discuss Article

Heap

This page discusses the heap data structure. For the place where memory is dynamically allocated from, see dynamic memory allocation.

In computer science a heap is a specialized tree-based data structure. Its base datatype (used for node keys) must be an ordered set.

Let A and B be nodes of a heap, such that B is a child of A. The heap must then satisfy the following condition (heap property):

key(A) ≥ key(B)

This is the only restriction of general heaps. It implies that the greatest (or the smallest, depending on the semantics of a comparison) element is always in the root node. Due to this fact, heaps are used to implement priority queues. The efficiency of heap operations is crucial in several graph algorithms.

The operations commonly performed in a heap are delete-min (removing the root node), decrease-key (updating a key within the heap), and insertion (adding a new key to the heap).

Heaps are used in the sorting algorithm called heapsort.

Variants

External links


Source | Copyright



Related categories
Webmasters: Add your website here:


Help build the largest human-edited directory on the web.
 Submit a Site - Open Directory Project (modified) - Become an Editor

Modified contents copyright 2008. All rights reserved.