Advertisement
jorupp

https://leetcode.com/problems/kids-with-the-greatest-number-of-candies

Aug 10th, 2023
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. function kidsWithCandies(candies: number[], extraCandies: number): boolean[] {
  2. const max = Math.max(...candies);
  3. return candies.map(i => i + extraCandies >= max);
  4. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement