Ad
  • Custom User Avatar

    Guys it's been seven years since I did this, I don't use C++ anymore, no clue why this solution got attention recently but thanks for the votes!

  • Custom User Avatar

    Great work! Do know that you can always shorten up single line if statememts by ommiting the curly braces.The same goes for for, else, while etc.

  • Custom User Avatar

    simple, stright to the point, not the most efficient...

  • Custom User Avatar

    It looks complicated, but very smart. Sumptuously.

  • Custom User Avatar

    Ruby
    Test Results:
    Basic Tests
    Simple Cases (3 Passed, 0 Failed)
    Random Tests
    More Complex Cases
    Testing for [10, 10, 5, 5, 10, 0, 0, 0, 1, 0, 5, 5, 10, 1, 0, 5, 10, 1, 0, 0, 10, 5, 10, 0, 0, 1] (1 Passed, 0 Failed)
    #<TypeError: nil can't be coerced into Fixnum>
    +' block in paul_rand_tests'
    each' paul_rand_tests'
    block (3 levels) in <main>' each'
    `block (2 levels) in '

    Do the More Complex Cases test for an array of integers? I thought it supposed to test for an array of strings like in basic tests. What I am missing? Thank you a lot

  • Custom User Avatar

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