Skip to content
Dickson Law edited this page Apr 12, 2023 · 3 revisions

Classes

Heap(...)

A data structure that stores value-priority pairs and is optimized to access entries at the minimum and maximum priorities. Comparable to DS Priority Queues.

Note: This implementation does not place any guarantees on ordering for values of equal priority.

Ported Methods

Aliases

  • getMin(): Same as findMin().
  • getMax(): Same as findMax().

New Methods

  • clone(): Return a shallow clone of the heap.
  • cloneDeep(): Same as clone(), but also making deep copies of everything in the heap.
  • copyDeep(sourceHeap): Same as copy(sourceHeap), but with deep copies of everything in the source.

Clone this wiki locally