about | help | code help+videos | done | prefs |
Write a method that accepts an integer array and returns the largest positive "jump" between two consecutive numbers in the array. For example, the array {5,3,17,20,1} has a positive jump from 3 to 17 of 14, a positive jump from 17 to 20 of 3, and all other jumps are negative. So for this array, a value of 14 would be returned because it is the greatest positive jump. If there are no positive jumps, return zero. chronicLargestJump([5, 3, 17, 20, 1]) → 14 chronicLargestJump([]) → 0 chronicLargestJump([5]) → 0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 295
Copyright Nick Parlante 2017 - privacy