Find the peaks and lows in a given array of integers.
Given an array of integers, find the local peaks and lows (local extremums) in the array. Return a string with a P for each peak, an L for each low and a - for each other element.
Notes:
# | Size | % | Users |
|---|---|---|---|
#1 | 72 c. | Top 19% | |
#2 | 78 c. | Top 25% | |
#3 | 79 c. | Top 31% | |
#4 | 85 c. | Top 38% | |
#5 | 101 c. | Top 44% | |
#6 | 103 c. | Top 50% | |
#7 | 104 c. | Top 56% | |
#8 | 107 c. | Top 69% | |
#9 | 117 c. | Top 75% | |
#10 | 119 c. | Top 81% | |
#11 | 135 c. | Top 88% | |
#12 | 146 c. | Top 94% | |
#13 | 210 c. | Top 100% |