Skip to content

Instantly share code, notes, and snippets.

@Desolve
Created February 20, 2020 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Desolve/264600a62b62ab38307a7df607d87be3 to your computer and use it in GitHub Desktop.
Save Desolve/264600a62b62ab38307a7df607d87be3 to your computer and use it in GitHub Desktop.
0575 Distribute Candies
class Solution:
def distributeCandies(self, candies: List[int]) -> int:
return min(len(set(candies)), len(candies) // 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment