@@ -0,0 +1,563 @@
+import java.util.HashSet;%0D%0Aimport java.util.Random;%0D%0Aimport java.util.Set;%0D%0A%0D%0Apublic class _380InsertDeleteGetRandomO1 %7B%0D%0A%09Random random;%0D%0A%09Set%3CInteger%3E set;%0D%0A%09%0D%0A    public _380InsertDeleteGetRandomO1() %7B%0D%0A        random = new Random();%0D%0A        set = new HashSet%3CInteger%3E();%0D%0A    %7D%0D%0A    %0D%0A    public boolean insert(int val) %7B%0D%0A        return set.add(val);%0D%0A    %7D%0D%0A    %0D%0A    public boolean remove(int val) %7B%0D%0A        return set.remove(val);%0D%0A    %7D%0D%0A    %0D%0A    public int getRandom() %7B%0D%0A        return (Integer)set.toArray()%5Brandom.nextInt(set.size())%5D;%0D%0A    %7D%0D%0A%7D%0D%0A

Add 380 solution