What should be the comparator function for this one??
Comparator function?
What you should do in compare function is that :
1.First check character by character until the length of smaller string. Return wherever you get unequal.
2.If all are equal, then return the string which is having larger length.
1 Like
You can have a look at this short code snippet to get idea.
You may mark the thread as resolved if you feel so 
1 Like