Rust solution with array (16 ms)
\nstruct MyHashSet {\n    values: [bool; 1_000_001],\n}\n\nimpl MyHashSet {\n    fn new() -> Self {\n        MyHashSet {\n            values: [false; 1_000_001]
```\nstruct MyHashSet {\n    values: [bool; 1_000_001],\n}\n\nimpl MyHashSet {\n    fn new() -> Self {\n        MyHashSet {\n            values: [false; 1_000_001],\n        }\n    }\n\n    fn add(&mut self, key: i32) {\n        self.values[key as usize] = true;\n    }\n\n    fn remove(&mut self, key: i32) {\n        self.values[key as usize] = false;\n    }\n\n    fn contains(&self, key: i32) -> bool {\n        self.values[key as usize]\n    }\n}\n```
['Array', 'Rust']