Commit 0c63099
committed
Add clarification on sorted array assumption in comments
The added comments explain why the two-pointer approach works due to the sorted nature of the input array. This provides context for the algorithm and highlights its dependency on the input's precondition.1 parent 0a72460 commit 0c63099
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
0 commit comments