Pergunta de entrevista da empresa Google

It was very much similar to LeetCode Random Pick with Weight