4 lines🔥|| Easy Solution😍|| O(1) 🥵 || Boolean Array💡|| Stepped Explanation 😉
\n# Intuition\n Describe your first thoughts on how to solve this problem. \n###### Woah! let get with this solution easily\uD83D\uDE00 \n\n- At first to store 
\n# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n###### Woah! let get with this solution easily\uD83D\uDE00 \n\n- At first to store the index values by add or remove operation we use boolean array, by default false i.e. empty.\n- Also this well help us to maintain the set. i.e to store only unique index values.\n- Now for every add operation we will make that index  true that will make that index added, and \n- For every remove operation we again make that index false. \n- At last to check wheather key is present or not we return the index value wheather true or false.\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n###### Lets proceed with the steps straight forward : \n\n1. We will declare a Boolean array , that will be used to store the key values by index \uD83D\uDE09 \n\n       boolean[] arr  ;\n2. We will Initialize it with the constructor call to  to avoid redundancy.\uD83D\uDD25\n\n        public MyHashSet() {\n            arr  = new boolean[1000001];\n        }\n    - Here we set the value to `1000001` as that is our constraint value.i.e $$10^6$$\n    \n3. **IMPORTANT**\uD83D\uDCA1 : We simple make the add operations and false operations as `true` and `false` boolean values for that key index.\n    \n    - add() :\n    ```\n        public void add(int i) {\n            arr[i] = true;\n        } \n    ```\n    - remove() :\n    ```    \n        public void remove(int i) {\n            arr[i] = false;\n        }\n    ```\n4.  To Check \u2705  it contains or not the index value , we return that index value wheather it is true or false .\n\n    ```\n        public boolean contains(int i) {\n            return arr[i];\n        }\n    ```\n\n# Complexity\n- Time complexity: $$O(1)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(1)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n> Note : Do post your doubts in the comment section. \n\n# Code\n```\nclass MyHashSet {\n    boolean[] arr  ;\n    \n    public MyHashSet() {\n        arr  = new boolean[1000001];\n    }\n    \n    public void add(int i) {\n        arr[i] = true;\n    }\n    \n    public void remove(int i) {\n        arr[i] = false;\n    }\n    \n    public boolean contains(int i) {\n        return arr[i];\n    }\n}\n```\n<img src="https://assets.leetcode.com/users/images/a1173c93-0448-47ca-8427-142b9ef7173a_1685429722.3907552.jpeg" width="300" height="600">\n
['Array', 'Hash Table', 'Linked List', 'Design', 'Java']