Pergunta de entrevista da empresa Nisum

Coding question similar to ones on leetcode