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.
Alright thank you, this helps me alot.
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.Well, I don´t really see where the problem lies, can someone give me a hint? After 2 weeks I still don´t know whats the problem. Is there a mistake in the logic or did I forget to call something or whatever, Im still new to this page so I wouldnt know.
After seeing your code, it's not a kata issue, it is a problem with your code.
Oh alright thank you
This comment is hidden because it contains spoiler information about the solution
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.There is an error appearing saying that the code is unreachable eventhough there is nothing wrong with the code. It can´t reach the for-loop which doesn´t make any sense since the code works on a different compiler.
A problem with your code is not a kata issue, read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution about how to debug your code and if you need help, how to ask for it properly, without your code we can't know what you did wrong.
My code passed all the test cases but for the last one, it is throwing a Stack trace error. Could someone please help me figure out the issue?