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.
Using
count
instead ofsize
orlength
makes a huge difference:count
traverses an Enumerable, so you're losing a lot of CPU time for nothing, especially on large collections.http://batsov.com/articles/2014/02/17/the-elements-of-style-in-ruby-number-13-length-vs-size-vs-count/
That's not clever. Target was to output is as over-complicated as possible. Not as simple as possible.
OK, who's been marking this as 'clever'... ?
Oh, so I wasn't the only one with that solution. :D
This comment is hidden because it contains spoiler information about the solution
Terrific kata! It took me a long time to understand the challenge and then about the same length of time to figure out how to solve it, but I felt I really learned something and I don't think I'd change anything. Kudos!!!
This comment is hidden because it contains spoiler information about the solution
Nice kata and good tests. :-)
This comment is hidden because it contains spoiler information about the solution
Ooos, I left debugging statement in there. Is there any way to delete a solution after submitting?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Glad to hear downvotes likely to go away and I agree that this is a nice community. :-)
This comment is hidden because it contains spoiler information about the solution
When you say "user", do you mean the person developing the method to satisfy your written specification and your test? Or do you mean the person invoking the method?
Loading more items...