Skip to content

Commit

Permalink
Create greatest-candies.py
Browse files Browse the repository at this point in the history
simple oneliner solution, probably not technically most efficient implementation but it is the most elegant
  • Loading branch information
gabedonnan authored Jan 12, 2023
1 parent ede276e commit 06bb242
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions greatest-candies.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Solution:
def kidsWithCandies(self, candies: List[int], extraCandies: int) -> List[bool]:
return [candy + extraCandies >= max(candies) for candy in candies]

0 comments on commit 06bb242

Please sign in to comment.