Version: 0.1.00.1.10.1.20.1.30.1.40.1.5
import { Heap } from "./Heap";
export class MinHeap extends Heap {
constructor(key) {
super();
this.key = key;
}
compare(a, b) {
if (this.key) {
return a[this.key] <= b[this.key];
return a <= b;