Design a set supporting insert, remove and uniform getRandom, all in average O(1); follow-up with duplicates.
Design a set supporting insert, remove and uniform getRandom, all in average O(1); follow-up with duplicates.
The discussion opens with the full question.