Commit 18ff641
Stjepan Glavina
Minor fix in the merge_sort comments
There was an off-by-one error discovered by @tbelaire.
So, the two invariants we are enforcing are:
1. Run lengths are decreasing.
2. Sum of lengths of any two adjacent runs is less than the length of
their predecessor.
This commit changes the comment to be clearer and have correct bounds on `i`.1 parent dea7ef3 commit 18ff641
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1496 | 1496 | | |
1497 | 1497 | | |
1498 | 1498 | | |
1499 | | - | |
| 1499 | + | |
1500 | 1500 | | |
1501 | | - | |
1502 | | - | |
| 1501 | + | |
| 1502 | + | |
1503 | 1503 | | |
1504 | 1504 | | |
1505 | 1505 | | |
| |||
0 commit comments