Google interview question

Backtracking problem and interval DP problem.