Some Dynamic Programming problems