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've figured it out: using iterators such as loop, each, etc. will give the max iteration error. However, using
while true
does not, presumably because it's lower level. This is slightly obscure though - I always useloop do..end
overwhile true
, because I feel like it's better at communicating what it does. Hopefully this comment helps others who are stumped by this one!I'm quite confused by this. I know a couple of algorithms for calculating the size of linked list loops (none of which involve hashes or storing nodes), but they all require looping through the whole loop. However, that's impossible in this case, because the maximum number of loop iterations is limited to 5000, despite the fact that the kata gives us linked lists of much greater size.
I don't see how it's possible to determine the size of a loop when we're not allowed to go through the entire thing! Am I missing something?