https://onlinegdb.com/BJreLD8Nv

plz tell how to use comparator in this

hello @asinghal1_be19
define a compare function of ur own.
write ur comparsion logic inside tha function.
and then pass that function name as third argument in ur sort function.

refer this->

now what is the issue in i thttps://onlinegdb.com/r1aXnPU4D

logic for checking whether one string is substring of another is not correct.

check this->

image

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.