id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

findRange


Given an array of integers x, return the range of the values in the array. The range is defined as the difference between the largest and smallest values in the array. You may assume the array has at least one element.


findRange([1, 2, 3]) → 2
findRange([10, 3, 5, 6]) → 7
findRange([7]) → 0

...Save, Compile, Run (ctrl-enter)

public int findRange(int[] x) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Copyright Nick Parlante 2017 - privacy