Morgan Stanley Interview Question

DSA - Trees, DP, Backtracking