ByteDance Interview Question

algo question that uses backtracking.