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.

Examples
Input: [["RandomizedSet","insert","remove","insert","remove","remove","insert"],[[],[1],[2],[2],[1],[2],[2]]]
Output: [null,true,false,true,true,true,true]
Hints

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.