Problem in one test case

Can you solve it?

@akash_281

Hey @vatsal38
if (a.find(b)==0 || b.find(a)==0)

    return a.length() > b.length();

ye line kya karta hai aur what was the problem in my code?

@akash_281
your code gives wrong for this
2
abab
ac
basically if a string is present in another string as a prefix then only sort with a size greater than b size.


@vatsal38 check this

@akash_281 yes sorry check for this
2
abab
acccc
output should be
abab
acccc

Yeah thankyou @vatsal38 understood now