[LeetCode] 1431. Kids With the Greatest Number of Candies
Python
class Solution:
def kidsWithCandies(self, candies: List[int], extraCandies: int) -> List[bool]:
temp = max(candies)
answer = []
for candie in candies:
if candie + extraCandies < temp :
answer.append(False)
else:
answer.append(True)
return answer
댓글남기기