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.
Hi,
Thanks for your response.
The behavior you describe is intentional. The way I figure it, enqueue will be the more frequent operation and should be faster. At the very least, the cases are equal. If every object that gets enqueued is subsequently dequeued, it doesn't matter whether the performance hit is on enqueue or dequeue. But if there are some enqueued objects that don't get dequeued before the list is destroyed, my implementation saves n - 1 traversals, where n is the number of elements in the queue when it's destroyed (there is still one traversal required to destroy the remaining elements).
I believe my implementation is defensible and shouldn't be penalized. I can change it around to pass the kata, but I believe this is a bug in the way the kata is graded.
This comment is hidden because it contains spoiler information about the solution
I keep timing out. My implementation is a pretty standard queue implementation, so I think the tests are too aggressive.
I agree. The description is just wrong.
"If the value passed in is a string containing numbers or other characters other than spaces and alphabet letters, return 'Not letters'"
but
Testing for 1jh2o
It should work for random inputs too - Expected: "1", instead got: "Not letters"
:(
Ah, cool, thanks for the clarification!
This comment is hidden because it contains spoiler information about the solution