Ad
  • Custom User Avatar

    The expected and actual values in random tests are flipped.

    It also passes the same object to reference solution and user solution, so user modifying input can influence the tests (if the above is adjusted).

  • Custom User Avatar

    If array is all negative or empty return sum as 0. For example:

    The provided example beneath this sentence is not a valid example. The actual example is under the Notes section.

  • Custom User Avatar

    When two arrays have the same value you need to return first spotted.

    You need to find FIRST array (closest to top left corner)

    "Closest to top left corner" is not well-defined enough to unambiguously specify what is "first".

  • Custom User Avatar

    I finally started crafting a good solution to this after thinking about it for about 3 hours and then accidentally refreshed the page and lost all my work. End me.

    Update: Alright I have something but I'm failing the random testcases for weird reasons. It's saying my answer is wrong but the provided answer has the left index higher than the right index, e.g.
    [0, 9, 10, 89, 5194] should equal [27, 9, 10, 89, 5194.0]
    [0, 0, 4, 34, 1159] should equal [12, 0, 4, 34, 1159.0]
    [39, 0, 47, 15, 1916] should equal [84, 0, 47, 15, 1916.0]

  • Custom User Avatar

    Duplicate.