sorting || python3 || easiest solution
\n\nclass Solution:\n    def maximizeGreatness(self, nums: List[int]) -> int: \n        nums.sort() \n        count = 0\n        j = i = 0  \n        while j < 
\n```\nclass Solution:\n    def maximizeGreatness(self, nums: List[int]) -> int: \n        nums.sort() \n        count = 0\n        j = i = 0  \n        while j < len(nums):\n            if nums[i] < nums[j]:\n                count+=1 \n                i+=1\n            j+=1 \n        return count\n        \n        \n```
['Python3']