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

 

ranger


Return the difference between the maximum and minimum values in the array. If the minimum and the maximum are equal then return zero. Assume that the length of the array is at least one.


ranger([5, 12, 1, 7]) → 11
ranger([82, 68]) → 14
ranger([5, 6, 6, 5, 6, 5]) → 1

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

public int ranger( int [] a ){ }

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

Difficulty: 200

Copyright Nick Parlante 2017 - privacy