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
Streams were introduced with Java 8 in Mar 2014. This kata is dated back to Dec 2013.
A nice kata with a very thoughtful set of tests. Considering the difficulty of much of the 6 kyu katas, this one might be a good fit for being 5 kyu.
This comment is hidden because it contains spoiler information about the solution
...or, assuming left-to-right writing direction, right-aligned lines should be accepted in the mirrored text as default
Kudos for the original background story, and thanks for the old-school feeling! :-)
Random tests are there to ensure the robustness of your solution by checking cases not covered in the sample tests. Your best course of action depends on the number of failing test cases.
Based on the examples, apparently a valid ID should have exactly 9 digits. Yet some solutions accept IDs with a different number of digits. Consider adding a test for this case.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Extra "best practices" vote for thinking about the situation where the ball bounces exactly to the height of the window. I think none of the tests cover this specific situation.
I agree, I'm definitely not at the point of being able to solve a 5kyu kata under 10 minutes. :-) It must be a quite old one based on a) the number of solutions, and b) the fact that most upvoted JavaScript solutions do not employ the padString() function introduced in ECMAScript 2017.
It took me 3 different approaches and 2 days, but finally got this one down to 90-120ms. Thank you for this very good and challenging kata!