Pergunta de entrevista da empresa LinkedIn

Similar to leetcode 528, random pick with weight