BinaryHeap<T>: _items: T[]_compareFn(a: T, b: T): booleaninsert(item: T): voidInsert an item into the binary heapremove(): T | nullRemove the smallest item from the binary heap in case of a min heap or the greatest item from the binary heap in case of a max heapclear(): voidRemove all itemsmoveUp(pos: number): voidmoveDown(pos: number): voidswap(index1: number, index2: number): voidlength(): numberReturns the amount of items
remove(): T | nullRemove the smallest item from the binary heap in case of a min heap or the greatest item from the binary heap in case of a max heap