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.
This comment is hidden because it contains spoiler information about the solution
The road will be mastered by the walking one, so don't worry much.
Aaaaaaaaaah, it's a progression. Aaaaaaaaaah… indeed, this is better than (1..num).sum, cuz if num == 1e36, then we're in trouble. Good stuff! Thanks!
I dig this
This comment is hidden because it contains spoiler information about the solution
This solution seems to assume you can't refactor the Node class.
Beautiful
Excelent!
Would fail if
event
contains stuff like%d
.woow, thanks alot i didnt even know this.
This comment is hidden because it contains spoiler information about the solution
have replaced the
occurrences = Hash.new(0)
withoccurrences = {}
.It throws an error and i dont understand why, who can explain the reason?This comment is hidden because it contains spoiler information about the solution
I'm a newbie in Ruby and managed to answer this coding problem using a different solution. I just want to understand how the above answer is possible if anyone can explain please?
It's correct to say that the problem does not require
five_num
to check for invalid input.This approach changes the interface of Array, adding a new method that throws a
NoMethodError
when the Array instance doesn't conform to a special use case. As a result, any subsequent instance of Array can respond to a method that may be meaningless (and unsafe) for that instance.Why change the interface of Array?
Or to put it another way, would this also be a good solution? Why or why not?
Loading more items...