You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
412 B
15 lines
412 B
|
4 months ago
|
export default class MinBinaryHeap {
|
||
|
|
list: any[];
|
||
|
|
compareFn: (a: any, b: any) => number;
|
||
|
|
constructor(compareFn?: (a: any, b: any) => number);
|
||
|
|
getLeft(index: any): number;
|
||
|
|
getRight(index: any): number;
|
||
|
|
getParent(index: any): number;
|
||
|
|
isEmpty(): boolean;
|
||
|
|
top(): any;
|
||
|
|
delMin(): any;
|
||
|
|
insert(value: any): boolean;
|
||
|
|
moveUp(index: any): void;
|
||
|
|
moveDown(index: any): void;
|
||
|
|
}
|