Skip to content

Commit 06adb39

Browse files
committed
fix pop heap
1 parent f9d3df9 commit 06adb39

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

heap.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class Heap {
5757
// returns the max element in the heap and deletes it from the heap
5858
let max = this.heap[0]
5959
this.delete(0)
60+
this.heap = this.buildHeap(this.heap)
6061
return max
6162
}
6263

0 commit comments

Comments
 (0)