two sum
RU: two-sum
A classic problem: find two numbers in an array that add up to a target. The naive solution is O(n²) nested loops; the seen pattern solves it in O(n) time and space.
RU: two-sum
A classic problem: find two numbers in an array that add up to a target. The naive solution is O(n²) nested loops; the seen pattern solves it in O(n) time and space.