One test case not passing

i want to know that why one test case is not passing …because i think my code is correct

you are comparing mid with m in the else if condition, you should compare a[mid]