Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
return
s in your code are not structured correctly, and this causes a couple of problems:c++
in your inner loop is never reached, because your inner loop always hitsbreak
orreturn
on the first iteration. Your inner loop never has a chance to execute more than once.return
can be completely missed ifsentence
would happen to be empty. Your inner loop will never enter, andreturn
won't be encountered by the control flow. Compiler does not like this, you have to have somereturn
statement which will be executed even if yourfor
loops won't be entered.After seeing your code, it's not a kata issue, it is a problem with your code.
Read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution
Given it's one of your firsts katas and
It's probably you who is doing something wrong. Don't open an issue in cases like this, use
question
label and provide your code using markdown formatting and marking your post as having spoiler content, otherwise there is no way to help you.