Ad
  • Custom User Avatar
    order    1      2       3       4       5             6          7             8                    9
        {4, 14, -1, 4, -2, 13, 11, 16, 12, 18, 2, 0, -5, 17, -4, 7, 18, 5, 8, 10, 12, 12, 10, 5, 5, -4, 8, 0}
    pos      1      3       5       7       9            13         16            20                   26 
    

    I don't know if you're counting like I did there about the positions or not. I'll let someone else to check that. It would be useful if you post the input, expected and actual values of the failed tests.

  • Default User Avatar

    Language is c#. I ran into a couple, but the array below is the only one I kept track of.
    The test says the 8th value in the pos array should be 26 which corrisponds to the last 8 in the array.
    Based on the example the 8th peak should start in pos 20, which is the start of the 12 plateau.

    {4, 14, -1, 4, -2, 13, 11, 16, 12, 18, 2, 0, -5, 17, -4, 7, 18, 5, 8, 10, 12, 12, 10, 5, 5, -4, 8, 0}

  • Custom User Avatar

    Language? Examples?

  • Default User Avatar

    There are a lot of bad tests. Specifically a lot of the random tests don't properly handle plateaus and high values at starting/ending values when compared to the examples.