c#
```\npublic class MyHashSet {\n    private int keyRange = 769;\n    private List[] buckets = null;\n    \n    public MyHashSet() {\n        buckets = new List[k
```\npublic class MyHashSet {\n    private int keyRange = 769;\n    private List<int>[] buckets = null;\n    \n    public MyHashSet() {\n        buckets = new List<int>[keyRange];\n    }\n    \n    public void Add(int key) {\n        if (Contains(key))\n            return;\n        \n        int slot = key % keyRange;\n        \n        if (buckets[slot] == null)\n            buckets[slot] = new List<int>();\n        \n        buckets[slot].Add(key);\n    }\n    \n    public void Remove(int key) {\n        if (!Contains(key))\n            return;\n        \n        int slot = key % keyRange;\n        \n        if (buckets[slot] == null)\n            return;\n        \n        for (int i = 0; i < buckets[slot].Count; i++)\n            if (buckets[slot][i] == key)\n            {\n                buckets[slot].RemoveAt(i);\n                return;\n            }\n    }\n    \n    public bool Contains(int key) {\n        int slot = key % keyRange;\n        \n        if (buckets[slot] == null)\n            return false;\n        \n        for (int i = 0; i < buckets[slot].Count; i++)\n            if (buckets[slot][i] == key)\n                return true;\n        \n        return false;\n    }\n}
[]