LeetCode
Random Pick with Blacklist
Click
here
for an explanation.