Pergunta de entrevista da empresa Amazon

Tricky but manageable with leetcode