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 is the solution that helped me understand it. Thanks!
smooth
Hey! Quick heads-up about using indexOf in Java:
Even if your tests pass, using indexOf("word") > 0 misses the case when the word starts right at index 0 (the very beginning of the string). That’s because indexOf returns 0 when it’s at the start, and 0 > 0 is false.
To correctly detect the substring anywhere (including at the start), you should check:
(s.indexOf("word") != -1)
I apologize, I didn't know
Every comment you leave is visible from the home page, so if you post full solutions like this, please use the spoiler flag.
This comment is hidden because it contains spoiler information about the solution
What is a use of the first argument, int n? Its not needed, i believe.
Fixed a long time ago hereEdit: my bad, the translation was rejected altough there is a comment saying it got approved under it's suggestion. Reraising.
Use enumerate, dude
My solution is easier to understand. This was a lot like Fizzbuzz.
this is super slow...
My friend, we write solutions not tests. The TESTS round answers, not solutions. What are you talking about?
Very complex problem to figure out not only from the description, also the performance requirements are pretty high for being only a 6th kyu.
good
forbidden method
Loading more items...