C++ 99%, no hash function since size will fit in my L2 cache
Simply make an array of booleans and treat numbers as index\n\n\nclass MyHashSet {\npublic:\n    /** Initialize your data structure here. */\n    MyHashSet() { 
Simply make an array of booleans and treat numbers as index\n\n```\nclass MyHashSet {\npublic:\n    /** Initialize your data structure here. */\n    MyHashSet() { // Only about 1 MB, will fit in cache\n        this->arr = new bool[1000001];\n    }\n    \n    void add(int key) {\n        this->arr[key] = true;\n    }\n    \n    void remove(int key) {\n        this->arr[key] = false;\n    }\n    \n    /** Returns true if this set contains the specified element */\n    bool contains(int key) {\n        return this->arr[key];\n    }\n    bool *arr;\n};\n\nauto gucciGang = []() {std::ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);return 0;}();\n```
[]