Pergunta de entrevista da empresa Atlassian

Hackerank, about leetcode easy-medium difficulty