Getting Run time error in one code

Getting Run time error in below code


while getting AC in below code

The only difference is in comparator cmp and am unable to figure out my mistake .

hello @vg5823967
your code is working fine.
pls submit again

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.