Created
May 6, 2021 23:55
-
-
Save willshepp28/5bbd6aca5483eac9648dc9754e4d4e10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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