<reponame>Sax-Ted/Practicing-with-Leetcode<filename>0575-Distribute-Candies.py<gh_stars>0
class Solution:
    def distributeCandies(self, candyType: List[int]) -> int:
        length = len(candyType) / 2
        candySet = set(candyType)
        if len(candySet) < length:
            return len(candySet)
        else:
            return int(length)

class Solution:
    def distributeCandies(self, candyType: List[int]) -> int:
        length = len(candyType) / 2
        candySet = set(candyType)
        if len(candySet) < length:
            return len(candySet)
        else:
            return int(length)