Reduce Array Size to The Half
Medium
Greedy (Advanced)
Choose a set of integers and remove all their occurrences from the array. Print the minimum size of the set so that at least half of the array's elements are removed.
Constraints
2 <= n <= 10^5 (n is even)
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.