Challenges • Asked over 4 years ago by Anonymous
Why do we need to sort the array? Just keep adding the values into a set and then take the min of the size of the set and n /2 . Should be O(n) time complexity - no?
Link to problem: Treats Distribution.