Dynamic Programming, Recursion, Competitive Programming, Leetcode, 3sum.
realize if I tried to compute a length-5 array, this solution requires me to recompute 2Sum’s for the array each time I want to compute a 3Sum. Let’s write it similar to Fibonacci numbers. 3sum([1, 2, 3, 4, 5], 6) = 3sum([1, 2, 3, 4], 6) ++ 2sums([1, 2, 3, 4]) 3sum([1, 2, 3, 4], 6) = 3sum([1, 2,