Dynamic Programming, Recursion, Competitive Programming, Leetcode, 3sum.
f(3) + f(2) f(3) = f(2) + f(1) f(2) = 1, f(1) = 1 f(5) = (((1 + 1) + 1) + (1 + 1)) One should realize that we compute f(3) = (1+1) twice, one for computing f(4), one for computing f(5). This is the overlapping subproblems property. When we are computing the same substructures repeatedly, and the