Amazon interview question

Dynamic Programming Backtracking Stack Queue