Python 1-line


  • 3
    E

    class Solution(object):

    def distributeCandies(self, candies):
    	return min(len(candies) / 2,len(set(candies)))

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.