Sorted array problem

I have my code saved in the submission and I fail to understand why it is failing one of the test cases. also,pls tell me if my method is correct or not as the video shows different method.

Hi @Tushar-Goel-1587999611286693
Kindly share your code ide so that i can have a look.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.