Given a linked list, delete the xth node from the end.
Linked list: 1→2→3→4
x: 2
Result: 1→2→4
The first line contains an integer ‘T’ denoting the number of independent test cases.
For each test case the input has three lines:
For each test case, a line which contains space-separated integers denoting the elements of the resultant link list.
2
3
3 4 5
2
3
1 0 1
1
3 5
1 0
1 <= T <= 100
1 <= n <= 104
1 <= x <= n
1 <= element <= 105