Hello, the code bellow works on VS2019 on my computer, but failed on Sololearn (Cases 2 and 5).. Don't understand why..? Thanks for your help and possible amelioration!
Your code works perfectly but you need to read input in order to solve the Code Coach Challenges.
You are solving the task only for "sammich".
std::cout << dejaVu(str);
That's how you should take input.