Fix tests.

This commit is contained in:
Oleksii Trekhleb
2018-08-17 10:31:18 +03:00
parent 980601295d
commit 983492115d
2 changed files with 3 additions and 3 deletions

View File

@@ -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;
}