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.
This comment is hidden because it contains spoiler information about the solution
If the very next line is the only one that needs to be (in a loop / after an
if
), then the{
}
are not needed.I feel like it's very close to being a "realistic" code someone might actually write in their everyday work
OP solved it, closing
Yes, for yellow kata it is nothing unusual to expect a solution of some specific complexity class. Many yellow kata still accept solutions of poor complexity, but there are many which have stricter requirements.
Having said that, this particular kata has no special requirements, and slow solutions should still pass. Of your solution was timing out, it either had a bug and fell into an infinite loop, or was exceptionally slow ;)
This comment is hidden because it contains spoiler information about the solution