Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save willshepp28/5bbd6aca5483eac9648dc9754e4d4e10 to your computer and use it in GitHub Desktop.
Save willshepp28/5bbd6aca5483eac9648dc9754e4d4e10 to your computer and use it in GitHub Desktop.
def kids_with_candies(candies, extra_candies)
greatest_value = candies.max
candies.map { |candy|
(candy += extra_candies) >= greatest_value ? true : false
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment