Content deleted Content added
Line 1:
'''Binary heaps''' are a particular kind of [[heap]] such that each node only has two children. Binary heaps are commonly represented by [[array]]s of values. For example, the root of the tree could be item 0 in the array, and the children of item ''n'' are the items at 2''n''+1 and 2''n''+2; so item 0's children are items 1 and 2, 1's children are items 3 and 4, etc. This allows you to regard any 1-based array as a possibly-screwed-up heap.
Line 24 ⟶ 25:
* http://www.policyalmanac.org/games/binaryHeaps.htm
▲[[Category:data structures]]
[[de:Binärer Heap]][[pl:Kopiec (informatyka)]]
|