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.
Thank you very much for explanation.
What? How? I am sure that this is clever solution, but definitelly not readable as book.
Will this remove trailing spaces on line without markers?
Ruby 2.5 appeared on Codewars relatively recently, while the kata is old.
Oh, I learn something new
.digits
! Thanks.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Wau! Clever usage of returning value. And nicely uncomplicated Regexp.
This comment is hidden because it contains spoiler information about the solution
sum_array(arr) => use just
arr.sum
This comment is hidden because it contains spoiler information about the solution
It's not smart and I wrote this during my "solve every problem as fast as possible without using a brain cell" streak, don't bump this in production.
Exactly like mine solution, not oneliner, but nicely readable!
It looks like smart solution, I guess, but I would like to not bump into this in production. Not so readable.
In this approach I would just store min lenght in variable, and overwrite it if some lower occurs. Instead building array of lenghts and sort it.
Loading more items...