Pergunta de entrevista da empresa AT&T

The test was mostly LeetCode-style.