Insert Delete GetRandom O(1)
Design a set-like collection with insert, remove, and getRandom operations; updates report whether membership changed, random selection is uniform over stored values, and every operation runs in average constant time.
Design a set-like collection with insert, remove, and getRandom operations; updates report whether membership changed, random selection is uniform over stored values, and every operation runs in average constant time.