Clarify part 1 strategy
This commit is contained in:
parent
8f4d06e24d
commit
0e60744957
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ Every time the window slides, I decided to sort it, which means I could take the
|
||||||
* When selecting the first number in the pair, stop early if added to the first number in the preamble it's
|
* When selecting the first number in the pair, stop early if added to the first number in the preamble it's
|
||||||
greater than the target, because we know the rest of the numbers are also too large.
|
greater than the target, because we know the rest of the numbers are also too large.
|
||||||
* Similarly can do the same when checking for the second number in the pair.
|
* Similarly can do the same when checking for the second number in the pair.
|
||||||
* Avoids comparing pairs we already compared.
|
* Avoids comparing pairs we already compared, by only searching from the location of the first value onwards.
|
||||||
|
|
||||||
|
|
||||||
+--------+
|
+--------+
|
||||||
|
|
Loading…
Reference in a new issue