It doesnt pass 2nd test case

it doesnt pass the second test case and im unable to figure out what’s the problem with it.

Hello @maazsaad please wait i am checking your code:

yeah actually i just changed a[0]<=a[1] and it worked

Hello @maazsaad i have corrected and commented the mistake in your code:

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.