Backtracking sometimes need DP to avoid solve same subproblem.