Binary heap: Difference between revisions

Content deleted Content added
Notheruser (talk | contribs)
m fmt links
Pit~enwiki (talk | contribs)
m +de:
Line 1:
[[de:Binärer Heap]][[pl:Kopiec (informatyka)]]
'''Binary heaps''' are a particular kind of [[heap]] that only has two children. Binary heaps are commonly represented by [[array]]s of values. For example, the root of the tree could be item 1 in the array, and the children of item ''n'' are the items at 2''n'' and 2''n''+1; so item 1's children are items 2 and 3, 2's children are items 4 and 5, etc. This allows you to regard any 1-based array as a possibly-screwed-up heap.