1431. Kids With the Greatest Number of Candies
There are
nkids with candies. You are given an integer arraycandies, where eachcandies[i]represents the number of candies theithkid has, and an integerextraCandies, denoting the number of extra candies that you have.Return a boolean array
resultof lengthn, whereresult[i]istrueif, after giving theithkid all theextraCandies, they will have the greatest number of candies among all the kids**, orfalseotherwise.Note that multiple kids can have the greatest number of candies.
1 | class Solution { |