Pergunta de entrevista da empresa Intel Corporation

Reverse sentence problem from leetcode