Not a DP actually. It's just recursion.