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.
I was wondering that myself, niklasb, but then I found this on Wikipedia:
"If the input is given as a subroutine for calculating ƒ, the cycle detection problem may be trivially solved using only λ+μ function applications, simply by computing the sequence of values xi and using a data structure such as a hash table to store these values and test whether each subsequent value has already been stored. However, the space complexity of this algorithm is λ+μ, unnecessarily large. Additionally, to implement this method as a pointer algorithm would require applying the equality test to each pair of values, resulting in quadratic time overall. Thus, research in this area has concentrated on two goals: using less space than this naive algorithm, and finding pointer algorithms that use fewer equality tests."
Incorrectly converts THE-STEALTH-WARRIOR into THESTEALTHWARRIOR instead of into TheStealthWarrior
what the heck kind of restriction is that?! How is one solution "better" than the other if it has the same asymptotic complexity, same code length and same real-world performance. That's just arbitrary.
You should tell that Hash has been disabled in the instructions. I was trying my solution and wondering why it didn't work at all!
This comment is hidden because it contains spoiler information about the solution
It's a really nice kata but I'd disable the Hash class for it. Using a hash isn't really a point of this kata – there are far better ways (see the author's solution).
Rather impressive. Took me a couple minutes to understand how it works :) Really smart solution.