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.
Was going through the oldest katas when I found out I actually made a Ruby fork adding tests and moving to MRI 3.0.0 version lol
Link: https://www.codewars.com/kumite/630ce9fee3c3a3b18815bc9e?sel=630ce9fee3c3a3b18815bc9e
only came here because this is the oldest question
oh no!
Also, just like StackOverflow, fastest gun in the west effect applies, and it's mostly everyone upvoting on the same early solution that was top because it was top and hence most visible.
Also, voting system is popularity vote so it's not necessarily a good indicator at all. Do you want to listen to 1000 novices, or 3 very experienced coders explaining the same topic? ;-)
Best Practices
orClever
depends upon who you talk to, and whether they had their coffee yet, or which day of the week it is. for example, one might insist thatBest Practices
applies to this solution, while another might remind us how code golf is not always the best solution. also,Best Practices
seems more presumptive thanClever
, sinceBest Practices
conforms to some standard, whileClever
is basically like saying cool brosince a vote basically means thumbs up, choose either one
No random tests.
No sample tests.
I kept getting 'can't connect to server' for this and the bang version. Oh well.
I wouldn't go that far, but this did feel a bit gimped by the example :) Then again, I was prodded to learn more by how the example did NOT explain why the yielder parameter / infinite loop function the way they do in this context.
I'm not sure why this is marked as "Clever".
Annoying. This is exactly the solution I provided and the site kept failing every time i ran the code. #codewars_fail
This comment is hidden because it contains spoiler information about the solution
You should have used operator === instead of ==
Unknown unknowns are the best to learn.
The question of whether the input is an array or a range is still ambiguous.
Loading more items...