1431. Kids With the Greatest Number of Candies
https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/
Python
class Solution:
def kidsWithCandies(self, candies: List[int], extraCandies: int) -> List[bool]:
all_max = max(candies)
return [(amount + extraCandies) >= all_max for amount in candies]