Skip to content

Commit

Permalink
Improved starting point of brute force attempt for two-sum problem.
Browse files Browse the repository at this point in the history
Co-authored-by: Stuart Turner <[email protected]>
  • Loading branch information
tacosontitan and viceroypenguin authored Apr 9, 2024
1 parent 705e0be commit c03f4bb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ private static IEnumerable<int> DryRun(
{
for (var x = 0; x < numbers.Length; x++)
{
for (var y = 0; y < numbers.Length; y++)
for (var y = x + 1; y < numbers.Length; y++)
{
if (x == y)
continue;
Expand Down

0 comments on commit c03f4bb

Please sign in to comment.