What is wrong in this logic

for the question sorted array check

this code is failing test 2
please help me find out what is wrong in this logic

@dhruvprashar
5
1 2 3 3 3
ans true
your false