Ruby Array
Runtime: 100 ms, faster than 60.00% of Ruby online submissions for Design HashSet.\n\n\nclass MyHashSet\n\n=begin\n    Initialize your data structure here.\n=en
Runtime: 100 ms, faster than 60.00% of Ruby online submissions for Design HashSet.\n\n```\nclass MyHashSet\n\n=begin\n    Initialize your data structure here.\n=end\n    def initialize()\n        @array = Array.new(1000000)\n    end\n\n\n=begin\n    :type key: Integer\n    :rtype: Void\n=end\n    def add(key)\n        @array[key] = true\n    end\n\n\n=begin\n    :type key: Integer\n    :rtype: Void\n=end\n    def remove(key)\n        @array[key] = nil\n    end\n\n\n=begin\n    Returns true if this set contains the specified element\n    :type key: Integer\n    :rtype: Boolean\n=end\n    def contains(key)\n        !!@array[key]\n    end\n\n\nend\n```
['Array', 'Ruby']