Ad
  • Custom User Avatar

    The linked kata only asked for peaks whereas the one I posted asked for both local minimas and local maximas. I have also searched to find if there was any other kata asking for both of these and found none.

  • Custom User Avatar

    I have changed the kata to make it that the output of a plateau would be its starting and ending positions.

  • Custom User Avatar

    For your first point I haven't figured out yet how to add the random tests with plateaus so I haven't added them yet. I will fix the problem with the oldest ages since I used it as an example to know what to put where. And the kata you linked actually gave me the idea to create this one but instead of only locating local maximas (peaks) in this kata you have to locate both local maximas and local minimas in order to get the solution right. I will add a section to the description that I was inspired by this kata.

  • Custom User Avatar

    Indices 10 to 12 does not make a plateau because they aren't at a local maxima or local minima state, in this example after these indices there's a -4 which will be less than the consecutive -2s. Hope my explanation made it clear.

  • Custom User Avatar

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