Content deleted Content added
No edit summary Tag: Reverted |
|||
Line 226:
By swapping the values ''a''[''i''] and ''a''[''j''] the heap property for position ''i'' is established.
At this point, the only problem is that the heap property might not hold for index ''j''.
The
The
For big heaps and using [[virtual memory]], storing elements in an array according to the above scheme is inefficient: (almost) every level is in a different [[Page (computer memory)|page]]. [[B-heap]]s are binary heaps that keep subtrees in a single page, reducing the number of pages accessed by up to a factor of ten.<ref>{{cite magazine|first = Poul-Henning|last= Kamp|url = http://queue.acm.org/detail.cfm?id=1814327 |title = You're Doing It Wrong|magazine= ACM Queue|date = June 11, 2010|volume = 8|issue = 6}}
|