why do we return true for string a greater in length than string b where b being a"s substring and false for the opposite where string b is greater in length than a and a being b"s substring
String sort bool compare doubt
@rohit_1906
bro the condition is correct u see the code of comparator it says the same thing
basically is
a= batman
b = bat
then a.size() > b.size() and b is substring of a then true is returned
so batman comes first that is what the question has asked us
if
a= bat
b = batman
b.size() > a.size() and a is substring then false is returned
since a should come later