Bloomberg Interview Question

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