Latest Peak
Return the index of the largest value in values. If the largest value appears more than once, return the last index where it appears.
Example 1
values [2,9,4,9,1]
returns 3
9 appears at indexes 1 and 3, so the answer is 3.
Constraints
1 <= len(values) <= 100
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More NumPy problems
- Merge and SortEasy
- Missing NumbersEasy
- Most Common ValueEasy
- Most Different PositionEasy
- Outlier CountEasy
- Pair DifferencesEasy
- Percent ChangeEasy
- Row RangesEasy