If more than half of the candies are unique, the sister can get at most size / 2 kinds of candies since it's evenly distributed by candy count. If less than half of the candies are unique, the sister can get at most the number of unique candies.

```
public int distributeCandies(int[] candies) {
Set<Integer> set = new HashSet<Integer>();
for (int num : candies) set.add(num);
return Math.min(candies.length/2, set.size());
}
```