Ad
  • Custom User Avatar

    Very nice. Just: what does ".count{|d| d[0] == 0}" ?

  • Custom User Avatar

    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 `
    '

  • Custom User Avatar

    Hum! Very interesting, thank you!

  • Custom User Avatar

    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?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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"

  • Custom User Avatar

    Expected: "Southriver Southriver", instead got: "Southriver"
    Inputs : "Southriver"

  • Custom User Avatar

    This solution is limited to the keys you are giving. Not that good.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Compare to the top solution, this is much easier to read, with low complexity

  • Custom User Avatar

    wtf! a map on a times XD
    Where can i find doc on the "(?**.. )" ?

  • Custom User Avatar

    because your code work only on string maybe, not on [1,2,3,4] for example.
    Print the input to see what is sent

  • Custom User Avatar

    because your code work only on string maybe, not on [1,2,3,4] for example.
    Print the input to see what is sent

  • Custom User Avatar

    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.

  • Custom User Avatar

    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"