Adding some DP solutions.