LinkedLists.FakeNode
To avoid border cases we can create a fake or how it is called sentinel node
public void DoSmth(ListNode head) { ListNode fakeNode = new
To avoid border cases we can create a fake or how it is called sentinel node
public void DoSmth(ListNode head) { ListNode fakeNode = new
basic approach is to change connection node.next = node.next.next
1. RemoveElements(ListNode head, int val)
leetcode task
optimal solution through sentinel or fake node