Suppose you have an IntSet class that represents an unordered mutable collection of integers without duplication (that is, the same integer does not appear twice in the set). Suppose it has only the following methods:
void add(int x) //adds x to this set if it is not already there void remove(int x) //deletes x from this set if it is in the set int size() //returns the number of integers in the set boolean contains(int x) //returns true if x is in this set
Assume that add does nothing if x is already in the set. Similarly, assume remove does nothing if x is not in the set.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.