Ad
  • Default User Avatar

    One of your test cases is still not correct, i mean this one:
    v: [ 2 1 3 2 2 2 2 5 6 ] peaks: [ 3 ] --- pos: [ 2 ]

    You have two peaks instead of just one: [ 2 1 3 2 2 2 2 5 6 ] at positions: 2 (peak 3 )and also at 7 (peak 5)