Design a data structure that supports insert, remove, and membership checks for integers in average constant time.
Design a hash set from scratch for integer keys.
Implement a class that supports the following operations:
add(key): Insert key into the set if it is not already present.remove(key): Remove key from the set if it exists.contains(key): Return true if key exists in the set, otherwise false.Your implementation should behave like a set: duplicate inserts should not create duplicate entries, and removing a missing key should do nothing.
Provide an interface with average time per operation.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.