Commit 1fdd7c6
committed
Fix loop condition to prevent duplicate index usage
Updated the while loop condition from `<=` to `<` to ensure that the two-pointer indices do not overlap. This prevents potential errors when processing the array and aligns with the expected logic of the algorithm.1 parent 0c63099 commit 1fdd7c6
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments