Hi, please help me how to approach the problem?
I understood but having difficulty to start with because we have to check lexicographically.
Please help me to start with the problem.
Unable to approach
Hey, you just need to make your own comparator function.
Whats the condition ?
Smaller alphabet shall come first. Thats it!
If the word is a substring of other, keep the longer word before.
Try to code. Ask any doubt regarding it.
You may have a look to my sample code.
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.