Test cases are failed

i am getting wrong answer

@anyamaurya you are comparing lengths only,instead you need to first check if larger string contains the smaller string as prefix,if yes then perform comparision.
If not then do simple comparision, return a<b;
If this resolves your doubt mark it as resolved.

@anyamaurya this should be the comparision function.

bool myCompare(string a, string b) {
    if (a.find(b)==0 || b.find(a)==0)
        return a.length() > b.length();
    return a < b;
}