Distribute Candies - LeetCode
Alice has n candies, where the candy is of type candyType[i]. Alice noticed that she started to gain weight, so she…leetcode.com Problem Given an array of candies, determine the maximum amount of different candies one can eat if the maximum amount of candies to be consumed is n / 2, where n is the amount of candies. Example: Input: candyType = [1,1,2,2,3,3]
Output: 3
Explanation: Alice can only eat 6 / 2 = 3…