Simple Java Solution
\nclass MyHashSet {\n\n    int set[];\n    \n    /** Initialize your data structure here. */\n    public MyHashSet() {\n        set = new int[1000001];\n       
```\nclass MyHashSet {\n\n    int set[];\n    \n    /** Initialize your data structure here. */\n    public MyHashSet() {\n        set = new int[1000001];\n        Arrays.fill(set, -1);\n    }\n    \n    public void add(int key) {\n        set[key] = key;\n    }\n    \n    public void remove(int key) {\n        set[key] = -1;\n    }\n    \n    /** Returns true if this set contains the specified element */\n    public boolean contains(int key) {\n        return set[key] != -1;\n    }\n}\n```
[]