Upon submission all my testcases are failed


please have a look at my code…

Don’t forget: if a string is present completely as a prefix in another string, then string with longer length should come first. Eg bat, batman are 2 strings and the string bat is present as a prefix in Batman - then sorted order should have - Batman, bat.