528 Random Pick with Weight
1. Question
Input:
["Solution","pickIndex"]
[[[1]],[]]
Output:
[null,0]Input:
["Solution","pickIndex","pickIndex","pickIndex","pickIndex","pickIndex"]
[[[1,3]],[],[],[],[],[]]
Output:
[null,0,1,1,1,0]2. Implementation
3. Time & Space Complexity
Last updated