The simplest Java solution
Solution is very simple: \n-create an array of boolean with length 1000001 \n-add method means:  set true\n-remove method means:  set false\n-contains method me
Solution is very simple: \n-create an array of boolean with length 1000001 \n-add method means:  set true\n-remove method means:  set false\n-contains method means:  check if true or not\n\n```\nclass MyHashSet {\n    \n    private boolean[] array = new boolean[1000001];\n    \n    public MyHashSet() {        \n    }\n    \n    public void add(int key) {\n        array[key] = true;        \n    }\n    \n    public void remove(int key) {\n        array[key] = false;\n    }   \n\n    public boolean contains(int key) {\n        return array[key];\n    }\n}\n```
['Java']