Pergunta de entrevista da empresa Bloomberg

A self made-up question that wasn't even on leetcode