about | help | code help+videos | done | prefs |
Write a method that returns the value of the greatest integer in the array if the parameter 'greatest' is true. Otherwise return the value of the least integer in the array. There can be any combination of positives, negatives, and zeros in the array. You must NOT initially assume a particular fixed-value for the greatest or least value in the array. You may not get credit for this problem, even if you get "all green" if you do not follow these requirements. dec18_2017_SLHL_getLargest([167, 235], true) → 235 dec18_2017_SLHL_getLargest([167, 235], false) → 167 dec18_2017_SLHL_getLargest([5, 241, 432, 235, 124, 856, 53, 124, 3], true) → 856 ...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