Pergunta de entrevista da empresa Pinterest

basic backtracking and counting problems.