How the custom compare works

please explain how it works here

hello @Vikaspal could you please elaborate your doubt ?

@tusharaggarwal272 i want to solve this problems without the substr functions can please tell the iterative ways to solve this problems for prefix part one ???

wait i will let you know .

hey @Vikaspal is this question on hackerblocks ?
i am not able to find this question on hackerblocks .
could you please share the link for this question ?

hey @Vikaspal here is the code for the same without using substr in the code :


if you have any doubt in the code you can ask here .
if you feel that your doubt is cleared please mark this doubt as resolved and give star ratings .
Happy Learning !!

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.