Pergunta de entrevista da empresa Bloomberg

Asked to solve the Zuma Game problem (you can see it on leetcode).