i am unable to code it can u help me to understand it
About the challenge
@manoj2597 basically in this question we will use the custum sort like if you know about designing of comparator function in which if any string is the substring of the substring then we will return the true for the string with the laarger length and otherwise alphabetically.
Here for your reference i am attaching the code:
if you have any doubt in this:
you can ask here:
Happy Learning!!
bro in this code how x<y works i means give true or false
@manoj2597 this comparator will sort the strings alphabetically:
like if you will compare:
mango>apple then it wil return true.
In this way it is done :
Happy Learning!!
hey can u tell me in actual practice how this sorting function with comparator work as i know that if a<b then it sort elements in that order and vice versa but i want to know how comparator
do that sorting
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.