UNPKG

pq-heaps-ts

Version:

implementation of priority queues using heaps

12 lines (11 loc) 275 B
export declare class MaxHeap<T> { private heap; push: (num: T) => void; pop: () => T; top: () => T; heapifyUp: (index: number) => void; heapifyDown: (index: number) => void; size: () => number; isEmpty: () => boolean; print: () => void; }