One test case failed

after submitting three out of four test cases passed. also after changing to int it worked properly. values are very large so shouldn’t long long case work ??

No this is not the reason for failing testcase

image
here the if condition is wrong
you have to check array elements not index
correct condition

    else if(arr[m]>arr[k]){
        e=m-1
    }
1 Like

thanks . must have missed it.

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.