mirror of
https://gitlab.com/mfocko/LeetCode.git
synced 2024-11-10 00:09:06 +01:00
cs: add “1431. Kids With the Greatest Number of Candies”
Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
parent
c58830b483
commit
15e41e476e
1 changed files with 6 additions and 0 deletions
6
cs/kids-with-the-greatest-number-of-candies.cs
Normal file
6
cs/kids-with-the-greatest-number-of-candies.cs
Normal 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();
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue