Pregunta de entrevista de Apple

Leetcode medium based on backtracking and string