Java | No maps, only arrays | Sorting | Clean code
Complexity\n- Time complexity: O(n*log(n))\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(n)\n Add your space complexity here, e.g. O(n) \
# Complexity\n- Time complexity: $$O(n*log(n))$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(n)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n  public int[] frequencySort(int[] nums) {\n    var freq = new int[201][2];\n\n    for (var i=0; i<201; i++)\n      freq[i][0] = i - 100;\n\n    for (var a : nums)\n      freq[a + 100][1]++;\n\n    Arrays.sort(freq, (a, b) -> a[1] == b[1] ? Integer.compare(b[0], a[0]) : Integer.compare(a[1], b[1]));\n\n    var k = 0;\n    for (var i=0; i<201; i++)\n      for (var j = 0; j < freq[i][1]; j++)\n        nums[k++] = freq[i][0];\n\n    return nums;\n  }\n}\n```\nIf you like my solution, please upvote it!
['Array', 'Sorting', 'Java']