1
0
Fork 0
mirror of https://gitlab.com/mfocko/LeetCode.git synced 2024-09-19 17:56:55 +02:00

cs: add “1431. Kids With the Greatest Number of Candies”

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2024-01-07 16:05:10 +01:00
parent c58830b483
commit 15e41e476e
Signed by: mfocko
GPG key ID: 7C47D46246790496

View file

@ -0,0 +1,6 @@
public class Solution {
public IList<bool> KidsWithCandies(int[] candies, int extraCandies) {
var max = candies.Max();
return candies.Select(candies => candies + extraCandies >= max).ToList();
}
}