String sort in binary search


second testcase is not passing

hello @nishiumrao
in ur compartor u r not checking prefix correctly .
ur comparator should look like this->
image

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