Basically you are given an array and you have to keep removing any two unequal elements until the size of the array is minumum.
In the editorial it's said:- We get the following greedy solution — each time we take two characters with maximal occurrences number and delete them.
Can anyone plz tell why this solution always give the optimal answer ? Like why everytime we are selecting the elements with maximum frequency?
Thx a lot !!!