Help on Déjà vu (code coach) | Sololearn: Learn to code for FREE!


Help on Déjà vu (code coach)

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!

2/13/2020 4:53:26 PM


9 Answers

New Answer


And don't forget to delete your code so others can't copy your solution.


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::string str; std::cin>>str; std::cout << dejaVu(str); That's how you should take input.


Ok, thank you, i'll fix it with an user inuput, and maybe "using namespace std;" If the check test need it. Ps: Working =)


Yes indeed, I don't get the good subject in my head.. But yhe validation was working... Strange?


Yes it is an easier way to resolve the task like that, but going on a wrong subject.. Can't validate an other time. Thank to you for the indication morever




Of course yes! Forget each time..


I think find_first_of will not help you in this task. Make a simple loop for check if two adjacent letters are the same. If yes print Deja Vu. if not print Unique. just like that...


Yes ok, you r welcome.