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.
Ruby translation
Ruby translation
This expression represents the physical meaning of the first derivative.
See omegahm's explanation (first best solution)
I forgot to do it, thanks
I rewrote my solution
I'm just learning, but it seems to me that my last solution has O (1) complexity. Or am I wrong ?
This comment is hidden because it contains spoiler information about the solution
I agree with you. Now I have more practice, and I would rewrite my solution with || operator, shorter version of .map{|j| j.to_i} and so on
Because 2 is a prime