Go, C# || Sorted slice
Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time complexity: O(nlog(n))\n- Space complexity: O(1)\n\n# Code\nGo []\nfunc maxim
# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(nlog(n))\n- Space complexity: O(1)\n\n# Code\n```Go []\nfunc maximizeGreatness(nums []int) int {\n\tsort.Slice(nums, func(i, j int) bool {\n\t\treturn nums[j] > nums[i]\n\t})\n\n\tvar res int = 0\n\tfor i := 1; i < len(nums); i++ {\n\t\tif nums[i] > nums[res] {\n\t\t\tres++\n\t\t}\n\t}\n\treturn res\n}\n```\n```C# []\npublic class Solution {\n    public int MaximizeGreatness(int[] nums)\n    {\n        Array.Sort(nums);\n        int res = 0;\n        for (int i = 1; i < nums.Length; i++)\n            if (nums[i] > nums[res])\n                res++;\n        return res;\n    }\n}\n``\'
['Go', 'C#']