Tested with custom input gives correct answer, whle submitting gives wrong


#1

Testcase: 67 0 4 4 10 6 6 10 16 3 14 9 9 14 3 16 13 -1 7 11 -1 -1 -1 15 15 -1 -1 -1 11 7 -1 13 -1 12 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 12 -1 8 -1 5 2 2 5 -1 8 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1

Tested with custom input, my code gives 1. Somehow with the same input output is 0 in submission


#3

If you are using anything global or across the functions, are you resetting it to initial value in your isSymmetric()?