Domanda di colloquio di Lenovo

Backtracking and Greedy algorithm leetcode question.