Perforce Software Interview Question

Backtracking problem statement to solve.