Skip to content

Instantly share code, notes, and snippets.

@rvbsanjose
Created August 24, 2012 07:10
Show Gist options
  • Save rvbsanjose/3447000 to your computer and use it in GitHub Desktop.
Save rvbsanjose/3447000 to your computer and use it in GitHub Desktop.
Count Between
def count_between(array, lower_bound, upper_count)
times = []
until array.size == 0
check_num = array.pop
if check_num.between?(lower_bound, upper_count)
times « check_num
end
end
times.length
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment