Skip to content

Commit

Permalink
FIx hybrid sort bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabau committed Oct 13, 2024
1 parent 81f7a24 commit fa5ffa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gabau.github.io/src/pages/fun/SortVisPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class InsertionSortState implements SortingState {
}

getNextStep(values: number[]): undefined | "finished" | number[] {
if (this.end !== undefined && this.i >= this.end) return "finished";
if (this.end !== undefined && this.i >= this.end && !this.middleOfLoop) return "finished";
if (this.i >= values.length && !this.middleOfLoop) return "finished";
if (values.length <= 1) return "finished";
if (!this.middleOfLoop) {
Expand Down

0 comments on commit fa5ffa4

Please sign in to comment.