Insert Delete GetRandom O(1)
Design a data structure that supports insert, remove, and getRandom in average O(1) time. insert and remove return true if the operation changes the set, otherwise false.
Design a data structure that supports insert, remove, and getRandom in average O(1) time. insert and remove return true if the operation changes the set, otherwise false.