Concise LINQ solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nWith C# you can make us
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nWith C# you can make use of LINQ. For this problem, LINQ can provide a concise solution with each method in the chain is self-explaind and following the stated requirement step by step (GroupBy / Count -> Order by Count -> then by Decreasing value)\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nIf we break down:\n 1. GroupBy: internally should do loop through entire array and capture in a hash table -> O(n)\n 2. OrderyBy: O(nlogn). Ordering inside each group also takes O(log) but all the interal list elements constitute the original array so that\'s another O(nlogn) \n 3. Total: O(nlogn) \n \n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\npublic class Solution {\n    public int[] FrequencySort(int[] nums) =>\n        nums.GroupBy(v => v)\n            .OrderBy(g => g.Count()).ThenByDescending(g => g.Key)\n            .SelectMany(g => g).ToArray();\n}\n```
['C#']