Mapped string question


what is the mistake in my code??

if your are using string
then use push_back() and pop_back() function

you can see it in modified code

there are some other unneccasary parameters in your code
like j and e if you want you can remove them

in base case use can use
if(s[i]=='\0')

if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like :heart:: and don’t forgot to mark doubt as resolved :grinning:

but this not giving right ans…

you have to add
u.pop_back();
at line on 16 as well

1 Like

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.