Google Interview Question

Backtracking problem and interval DP problem.