Biggest Jump
Look at each pair of neighbors in values. Return the largest absolute difference between two neighbors, as an int. If there is only one value, return 0.
Example 1
values [2,10,7,1]
returns 8
The jumps are 8, 3 and 6, so the answer is 8.
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
- Brighten ImageEasy
- Bucket CountsEasy
- Busiest ColumnEasy
- Change Between RowsEasy
- Close EnoughEasy
- Closest to OriginEasy
- Closest to TargetEasy
- Column MaximumsEasy