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