Dynamic Programming, Recursion, Competitive Programming, Leetcode, 3sum.
So, what would be an case where we have overlapping subproblems? The canonical example is the fibonacci numbers. We all know and love fibonacci numbers, f(n) = f(n-1) + f(n-2) . When we write the paranthesis based computation tree, we will see something very interesting. f(5) = f(4) + f(3) f(4) =