I tried

1

2

1

case but It still fails

shouldn’t the answer for this case be just

1 2

??

The answer is suppose to be `2 1`

. This is because you are suppose to return the root of the new list. The root of the list remains unchanged irrespective of where you insert the value. Since the root remains 2 here and 1 is inserted as its next element, the list still remains sorted (it is circular list) and the output is `2 1`