how to find out that bat is the prefix of batman?
S_t_r_i_n_g__s_o_r_t
@rishaseth123 hey risha you have to make a compare function which accepts two string a ,string b
if ( (a==b.substr(0,a.length())))
return b.length()>a.length();
else if((b==a.substr(0,b.length())))
return a.length()>b.length();
return a<b;
using inbuilt substring function you can find out the prefix