1. All the node values are positive.
2. The size of the linked list is greater than 1.
3. The end of the linked list is represented by -1.
The first line of the input contains an integer T denoting the number of test cases.
The first and the only line of each test case contains the values of nodes of the linked list L, which is to be modified as shown above.
For each test case, print a single line containing space-separated integers denoting the values of the modified linked list.
The output of each test case will be printed in a separate line.
You do not have to print anything, it has already been taken care of. Just implement the given function. Also, update the given linked list in place.
1 <= T <= 50
1 <= N <= 10 ^ 4
Where 'N' is the number of nodes in a linked list.
Time Limit: 1 sec.
Deletion In Doubly Linked List
Insertion In Doubly Linked List
LRU Cache
Delete Nodes On Regular Intervals
Add One To Linked List