mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2026-03-13 08:51:02 +08:00
Fix tests.
This commit is contained in:
@@ -257,9 +257,9 @@ export default class Heap {
|
||||
nextIndex = this.getLeftChildIndex(currentIndex);
|
||||
}
|
||||
|
||||
if (!this.pairIsInCorrectOrder(
|
||||
this.heapContainer[nextIndex],
|
||||
if (this.pairIsInCorrectOrder(
|
||||
this.heapContainer[currentIndex],
|
||||
this.heapContainer[nextIndex],
|
||||
)) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user