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.
Very nice. Just: what does ".count{|d| d[0] == 0}" ?
I got error message even the test is passed.
I delete all the code, just kept the return 0 if array.empty? and i got error below the right return.
Test Passed: Value == 0
main.rb:5:in
getLengthOfMissingArray' main.rb:21:in
block (2 levels) in'
/runner/frameworks/ruby/cw-2.rb:180:in
wrap_error' /runner/frameworks/ruby/cw-2.rb:72:in
it'/runner/frameworks/ruby/cw-2.rb:206:in
it' main.rb:10:in
block in'
/runner/frameworks/ruby/cw-2.rb:55:in
block in describe' /runner/frameworks/ruby/cw-2.rb:46:in
measure'/runner/frameworks/ruby/cw-2.rb:51:in
describe' /runner/frameworks/ruby/cw-2.rb:202:in
describe'main.rb:9:in `
'
Hum! Very interesting, thank you!
The + instead of the <<... obviously!
What i don't understand and what make me stop testing other obvious solutions is the fact that the "expected" result is wrong. How can it be?
This comment is hidden because it contains spoiler information about the solution
All the inputs in the submit final tests are expecting to be doubled.
Without any code, you can tell if an input "Name" is expecting result "Name Name". I think we are not expecting that.
One more example :
Expected: "Clint Southhill Southhill", instead got: "Clint Southhill"
Input: "Clint", "Southhill"
Expected: "Southriver Southriver", instead got: "Southriver"
Inputs : "Southriver"
This solution is limited to the keys you are giving. Not that good.
This comment is hidden because it contains spoiler information about the solution
Compare to the top solution, this is much easier to read, with low complexity
wtf! a map on a times XD
Where can i find doc on the "(?**.. )" ?
because your code work only on string maybe, not on [1,2,3,4] for example.
Print the input to see what is sent
because your code work only on string maybe, not on [1,2,3,4] for example.
Print the input to see what is sent
The expected result is "Daley Wong, Nigel and 11 others like this, Nigel and 11 others like this"
Is this repetition correct?
The sentence has no sense.
Is the expected result is ok? The result repeats itself.
It should work for random inputs too - Expected: "Daley Wong, Nigel and 11 others like this, Nigel and 11 others like this", instead got: "Daley Wong, Nigel and 11 others like this"