Insert, delete and get random in O(1)
Design a set with insert(val), remove(val) and get_random(), each in average O(1) time. get_random returns each current element with equal probability.
No answer yet. Write the first one; the best answer gets endorsed.


