Hello everybody! | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Hello everybody!

Please I don't know how to return -1 if result is not as expected or count if result is as expected. If result is as expected I go through all tests but if not I don't know how to return -1. https://code.sololearn.com/cBYxXLwK0Aoh/?ref=app

10th Sep 2022, 4:48 PM
TeaserCode
2 Respostas
+ 1
What you mean? You are returning it, in a way already.. How you want next? Alternatively you can if( m == count) return count; return -1; // instead of your if else
10th Sep 2022, 5:13 PM
Jayakrishna šŸ‡®šŸ‡³
+ 1
Thanks for helping, but I also find the solution.
10th Sep 2022, 5:50 PM
TeaserCode