Python Elegant & Short | Sorting | Two pointers
\nclass Solution:\n    def maximizeGreatness(self, nums: List[int]) -> int:\n        nums.sort()\n        i = 0\n\n        for num in nums:\n            if nums
```\nclass Solution:\n    def maximizeGreatness(self, nums: List[int]) -> int:\n        nums.sort()\n        i = 0\n\n        for num in nums:\n            if nums[i] < num:\n                i += 1\n\n        return i\n\n```
['Two Pointers', 'Sorting', 'Python', 'Python3']