Ad
  • Custom User Avatar

    That plateau after the peak is not a plateau-peak, it's just a plateau.

  • Custom User Avatar

    At index 20 there is a plateau-peak.

  • Default User Avatar

    for arr [1,2,5,4,3,2,3,6,4,1,2,3,3,4,5,3,2,1,2,3,5,5,4,3],
    expected { pos: [ 2, 7, 14 ], peaks: [ 5, 6, 5 ] } to deeply equal { pos: [ 2, 7, 14, 20 ], peaks: [ 5, 6, 5, 5 ] }. How ?

  • Custom User Avatar

    expected { pos: [ 2, 3 ], peaks: [ 3, 2 ] } to deeply equal { pos: [ 2 ], peaks: [ 3 ] }
    assert.deepEqual(pickPeaks([2,1,3,2,2,2,2,5,6]), {pos:[2], peaks:[3]});

    why?