about | help | code help+videos | done | prefs |
abc1MaxDifference
Write a method that returns the difference between the highest and lowest value in an array of integers. Note that any integer is possible in the array, and the array can be of any length, including being empty. In the case of an empty array, return zero. abc1MaxDifference([4, 7, 421, 2, 8, 63]) → 419 abc1MaxDifference([100, 200, 300, -50, -100, -20, 20]) → 400 abc1MaxDifference([]) → 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: 250
Copyright Nick Parlante 2017 - privacy