Dynamic Programming, Recursion, Competitive Programming, Leetcode, 3sum.
3], 6) ++ 2sums([1, 2, 3]) Whereas 2sums([1, 2, 3, 4]) = 2sums([1, 2, 3]) * 3 Instead of the actual functions, I have written the number of steps associated with each computation, but the realization should be that we are computing 2sums([1, 2, 3]) twice, one for computing 3sum([1, 2, 3, 4], 6) and