8
Linked List
Amazon
FB
Apple
Google
Bloomberg
Microsoft
Q: Given the head of a linked list and an integer val, remove all the nodes of the linked list that has Node.val == val, and return the new head.
Hint:
Use "Dummy Node" to be the another linked list head.
Time complexity :O(N) Space complexity :O(1)