about | help | code help+videos | done | prefs |
Write a method called countInRange that accepts an array of integers, a minimum value, and a maximum value as parameters and returns the count of how many elements from the array fall between the minimum and maximum (inclusive). For example, in the array {14, 1, 22, 17, 36, 7, -43, 5}, there are four elements whose values fall between 4 and 17. countInRange([14, 1, 22, 17, 36, 7, -43, 5], 4, 17) → 4 countInRange([-4, 0, 1, -2, 7, 11, 5, 21], -2, 3) → 3 countInRange([-17, 2, -2, -3, 3, 5, 7, 10], 20, 21) → 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: 200
Copyright Nick Parlante 2017 - privacy