Given a linked list A, remove the B-th node from the end of the list and return its head.
For example, Given linked list:
B = 2. After removing the second node from the end, the linked list becomes
NOTE: If B is greater than the size of the list, remove the first node of the list.
NOTE: Try doing it using constant additional space.
1 <= |A| <= 106
The first argument of input contains a pointer to the head of the linked list.
The second argument of input contains the integer B.
Return the head of the linked list after deleting the B-th element from the end.
A = [1, 2, 3, 4, 5] B = 2
A =  B = 1
[1, 2, 3, 5]
In the first example, 4 is the second last element.
In the second example, 1 is the first and the last element.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.