Binary heap: Difference between revisions

Content deleted Content added
Copied from Heap
 
Added back link to heap and corrected spelling
Line 1:
'''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 iscould be item 1 in the array, and the children of the 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 ossiblypossibly-screwed-up heap.