Jump to content

Weak heap

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Andy Dingley (talk | contribs) at 18:31, 30 November 2015 (f.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A weak heap is a sub-form of a heap data structure. It is a relaxed heap satisfying the following three conditions:

  1. every key in the right subtree of a node is greater than the key stored in the node itself,
  2. the root has no left child
  3. leaves are only found on the last two levels of the tree.[1]

It's form supports finding the minimum value in it with worst-case time.

It is also useful for insert and delete-min or delete and decrease , with a worst-case time of .

References

  1. ^ Stefan Edelkamp, "weak-heap", in Dictionary of Algorithms and Data Structures [online], Vreda Pieterse and Paul E. Black, eds. 26 May 2011. (accessed TODAY) Available from: http://www.nist.gov/dads/HTML/weakheap.html