Test case gone wrong

I have tried this test case
nums = [-3,-2,-1,0] (sorted)
And expected [1,0,-2,-3] to give output 2 but it was wrong for this .