- Beap
Beap, short for bi-parental heap, introduced by Ian Munro and Hendra Suwanda. In this
data structure a node usually has two parents (unless it is the first or last on a level) and two children (unless it is on the last level). What separates the beap from Williams' heap is that beap allowssublinear search.Performance
The height of the structure is approximately . Also, assuming the last level is full, the number of elements on that level is also . In fact, because of these properties all basic operations (insert, remove, find) run in time on average. Find operations in the heap can be in the worst case. Removal and insertion of new elements involves propagation of elements up or down (much like in a heap) in order to restore the beap invariant. An additional perk is that beap provides constant time access to the smallest element and time for the maximum element.
Advantages
The main advantage of the beap is that it can be fully implemented in-place - only data nodes need to be present (no pointers or other extra information is required). However, this structure should be used with care since it is not nor does it perform much better than a vector for small values of n.
References
J. Ian Munro and Hendra Suwanda. "Implicit data structures for fast search and update". "
Journal of Computer and System Sciences ", 21(2):236250, 1980.J.W.J Williams in Algorithms 232, "Heapsort", "
Comm. ACM 7 " (June 1964), 347-348
Wikimedia Foundation. 2010.