Check my code showing error

@naaz line 28 no semi colon after if should be there. also code gives wrong for sample case. check these

now test case are wrong

@naaz
4
1 2 2 1
your code gives false check it.
always try for your own input first ( dry run them)

if give opposite output

it give opposite output , why i am not getting my mistake

@naaz share your current code

@naaz ok wait some time correcting

@naaz corrected


dont forget to hit like and mark resolved if cleared :smiley: