Google Interview Question

It was very much similar to LeetCode Random Pick with Weight