Ad
  • Custom User Avatar

    ty Giacomo it worked!

  • Custom User Avatar

    I think something may be wrong with the test cases. Using Ruby btw, the last two are very strange.
    Test Passed: Value == []
    Test Passed: Value == ["1"]
    Test Passed: Value == ["1->4"]
    Test Passed: Value == ["0->2", "5->6", "9"]
    Test Passed: Value == ["0->7"]
    Test Passed: Value == ["0->7"]
    Test Passed: Value == ["0->7", "9->10"]
    Test Passed: Value == ["-2", "0->7", "9->10", "12"]
    Expected: ["-2", "0", "-1", "-3->-2"], instead got: ["-2", "0"]
    Expected: ["-2", "0", "-1->0", "-1->0", "-1"], instead got: ["-2", "0"]

  • Custom User Avatar

    Such a nice and elegent solution. I always have this inkling that my code can be much cleaner. Well done.

  • Custom User Avatar