Remove All Elements from Linked List

Given the head of a linked list and an integer val, remove all the nodes of the linked list that have Node.val == val, and return the new head.

Difficulty:

Console