Pergunta de entrevista da empresa Palantir Technologies

Coding: Simple string manipulation question.