Distribute Candies LeetCode solution in Python

1
# Runtime: 1728 ms (Top 12.88%) | Memory: 16.4 MB (Top 8.29%)
2
class Solution:
3
def distributeCandies(self, candyType: List[int]) -> int:
4
return min(len(set(candyType)), (len(candyType) // 2))

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0