Easy linkedlist implementation
\nclass MyHashSet {\n    public class ListNode{\n        ListNode next;\n        int val;\n        public ListNode(int val){\n            this.val = val;\n     
```\nclass MyHashSet {\n    public class ListNode{\n        ListNode next;\n        int val;\n        public ListNode(int val){\n            this.val = val;\n            this.next = null;\n        }\n    }\n\n    /** Initialize your data structure here. */\n    ListNode head;\n    public MyHashSet() {\n        head = new ListNode(-1);\n    }\n    \n    public void add(int key) {\n        ListNode curr  = head;\n        if(contains(key)) return;\n        while(curr.next != null) {\n            curr = curr.next;\n        }\n        curr.next = new ListNode(key);\n    }\n    \n    public void remove(int key) {\n        ListNode curr = head;\n        ListNode prev = null;\n        if(!contains(key)) return;\n        while(curr.next.val !=  key) {\n            curr = curr.next;\n        }\n        curr.next = curr.next.next;\n    }\n    \n    /** Returns true if this set contains the specified element */\n    public boolean contains(int key) {\n        ListNode curr = head;\n        while(curr != null) {\n            if(curr.val == key) return true;\n            curr = curr.next;\n        }\n        return false;\n    }\n}\n\n/**\n * Your MyHashSet object will be instantiated and called as such:\n * MyHashSet obj = new MyHashSet();\n * obj.add(key);\n * obj.remove(key);\n * boolean param_3 = obj.contains(key);\n */\n```
[]