Linked List-K Append

giving no-output for the 3rd test case

7
1 2 2 1 8 5 6
7

make a dry run for the above test case
u got the answer