i wrote 1 code based on sort stl but it didnt work. please can anyone tell why it isnt working. here is the link of code.
My code isnt working
add cin.get(); after you take input n
also Don’t forget: if a string is present completely as a prefix in another string, then string with longer length should come first. Eg bat, batman are 2 strings and the string bat is present as a prefix in Batman - then sorted order should have - Batman, bat.