Pergunta de entrevista da empresa Compass

Similar like Leetcode question 139, 140