203.Remove Linked List Elements Posted on 2017-09-28 | In LeetCode Solution 1: accepted 2msShould be the most straight forward solution. 123456789101112131415class Solution { public ListNode removeElements(ListNode head, int val) { ListNode dummy = new ListNode(0); dummy.next = head; ListNode result = dummy; while (dummy.next != null) { if (dummy.next.val == val) { dummy.next = dummy.next.next; } else { dummy = dummy.next; } } return result.next; }}