second testcase is not passing
String sort in binary search
hello @nishiumrao
in ur compartor u r not checking prefix correctly .
ur comparator should look like this->

loop is checking for prefix ,if it voilates then we are comparing lexicographically
otherwise
we are comparing with size.