LeetCode
Random Point in Non-overlapping Rectangles
Click
here
for an explanation.