One test case not passing


This code is not running for 1 test case like:
3
1 2 -1