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.
The test numbers are smaller than the max of a signed 32bit integer. However, with each rotation through the queue you take a name out and then put it back on twice. As such the queue is growing exponentially in size and eventually the compiler is throwing an error when the queue is too large to fit any more entries in it.
I'm only commenting as my original solution was similar to yours and I hit the same problem!
In modern day systems are 64 bit, because 32 bit becomes too small at some point (just like this case). I do agree that I should've used 64 bit queue, but still the number 159222638 and 121580142 are smaller than the max value for a signed 32 bit Integer.
It's not because the tests stop after some time... I think it's because the Queue is growing expodentially in size and exceeds the Int32 limit.