1431. Kids With the Greatest Number of Candies
https://leetcode.com/problems/kids-with-the-greatest-number-of-candies
Description
There are n
kids with candies. You are given an integer array candies
, where each candies[i]
represents the number of candies the ith
kid has, and an integer extraCandies
, denoting the number of extra candies that you have.
Return a boolean array result
of length n
, where result[i]
is true
if, after giving the ith
kid all the extraCandies
, they will have the greatest number of candies among all the kids**, or false
otherwise.
Note that multiple kids can have the greatest number of candies.
Example 1:
Example 2:
Example 3:
Constraints:
n == candies.length
2 <= n <= 100
1 <= candies[i] <= 100
1 <= extraCandies <= 50
ac
Previous1430. Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary TreeNext1432. Max Difference You Can Get From Changing an Integer
Last updated