Ad
  • Custom User Avatar

    There is a problem wtih the test case: "The array was: [-1,1,0,-1,1,0,-1,1,0,0]: expected +0 to equal 2". Because the first index meeting the requirements is 0 but it expects to return the second satisfying index.

  • Custom User Avatar

    There is a problem wtih the test case: "The array was: [-1,1,0,-1,1,0,-1,1,0,0]: expected +0 to equal 2". Because the first index meeting the requirements is 0 but it expects to return the second satisfying index.

  • Custom User Avatar

    Fixed. Remember mentioning the language.

  • Custom User Avatar

    There seems to be a bad test case.
    It failed on the array of: { 7, 3, 3 }
    It expects an answer of 0, but there is no answer, so it is -1.
    However, in the 'printed' test case, it shows { 7, 3, -3 }, which DOES give an answer of 0, so I think there may be a typo in the test case, where one of the threes is missing a negative sign.

  • Custom User Avatar

    NVM I read wrong: The test is telling my code is failing because for {8,8} should give me -1 and it's giving me 1 (which is totally wrong)...

    Sorry ^^;

  • Custom User Avatar

    Hi there, I am having doubts about Length 2 sized arrays.
    When n=0, there is nothing at the left (because there is no -1 position), so the answer should be 1 if position 1 equals to 0.
    When n=1, there is something at the left (position 0) and nothing to the right (last position), so the answer should be 0 if position 0 equals to 0.

    So I don't understand why {8,8} should be 1! I mean, n is not being counted, but the numbers at the left and at the right of n, isn't it?
    Am I misreading something or missing something?

  • Custom User Avatar

    Java:

    • method name should be camelCase, not PascalCase

    Refer here on how to enable backward compatability to not invalidate all solutions

  • Custom User Avatar

    Reraised as an issue :-)

  • Custom User Avatar
  • Custom User Avatar

    @Awesome A.D.: thanks for the tip about printing during the test phase...it's a good thing to know (which I did not). Big thumb's up!

  • Custom User Avatar

    python, maybe others: there should be a fixed test for 0

  • Custom User Avatar
    • done
    • done for all languages
  • Custom User Avatar

    done

  • Custom User Avatar

    Awesome, works like a charm now, thanks!

  • Custom User Avatar

    Ruby:

    • Tests need update to Ruby 3,
    • The block with fixed tests seems to be not correct because it emits no assertions.
  • Loading more items...