Dynamic Programming and Programming Puzzles