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.
Try printing the input. Then you can see what inputs cause your code to fail and debug it from there.
Well I dont think so, in practice section filter to 5kyu and sorted by 'Popularity', you can see easier 5kyu katas there.
There is no answer to optimize the code in general. We don't know what you are trying to do.
It's not that easy. I advice you to practice on some easier katas involving regular expression. I believe this kata is not easy (I don't really know, I didn't solve it).
^$
You just need to understand the basic arithmetics concepts of the description. If you are not familiar with it, make researches online, it's easy to find many resources related to it. I believe this is an easy 5 kyu kata and any hint would give away too much of the solution.
This comment is hidden because it contains spoiler information about the solution
Thanks for the link! I found it quite helpful. I had no idea what to do, but after reading a bit about composing software, I came back here and was able to solve this surprisingly easily.
You need to look for composition here is a good introduction by Eric Elliott https://medium.com/javascript-scene/composing-software-an-introduction-27b72500d6ea