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.
so abstract
I benchmarked it and found it to be at least twice as slow as the ternary implemenatation. It looks nice though.
It's a question of what's more idiomatic. See Avdi Grimm's master work: Confident Ruby
The description specifies: "Input will always be a non-negative integer."
Don't think this solution is correct: when n and m are both negative, this solution will give you the positive result, when 0 should be returned.
relevant: https://xkcd.com/1445/
I like the consistency of logic.
Only seems to be happening for Clojure & Haskell for me. Ruby, Python, Coffeescript & Javascript solutions still seem to be working.
I'm surprised this hasn't been voted up. It's cleaner and easier to read than the current #1 solution.
I'm fairly certain this violates the spirit of the exercise =)
I like it!
This comment is hidden because it contains spoiler information about the solution
Isn't this a little unnecessary? Sure, it's mathematically smart, but will become innacurate quickly.
Is there a way to change your profile picture?
Didn't know about the tr method. Good to know :)
Loading more items...