it shows error
String sort challenge
hello @naazsayma123
a) add this cin.get() after reading n.

b) u compare function is not correct.
u check complete string to conclude whether one string is prefix of other or not.
( i ur code u are only checking for first character which is wrong).
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.