Link to the code- https://ide.codingblocks.com/s/195408
My code is giving TLE,pls rectify
my code is working fine without these two lines, but this is an conditional statement so logically shouldn.t give a TLE. … if(find(result.begin(), result.end(),in)!=result.end()) result.push_back(in);
@7nishit
hello nishit,
in place of vector use set . it will automatically sort the strings and also maintain a lexicographical order . and is effient then vector so i think it will solve ur tle issue