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 21% | |
#2 | 79 c. | Top 29% | |
#3 | 85 c. | Top 36% | |
#4 | 101 c. | Top 43% | |
#5 | 103 c. | Top 50% | |
#6 | 104 c. | Top 57% | |
#7 | 107 c. | Top 64% | |
#8 | 117 c. | Top 71% | |
#9 | 119 c. | Top 79% | |
#10 | 135 c. | Top 86% | |
#11 | 146 c. | Top 93% | |
#12 | 210 c. | Top 100% |