O(N) Sort Solution💕🐍
\n# Complexity\n- Time complexity:\n O(n) \n\n- Space complexity:\n O(n) \n\n# Code\njs\nclass Solution:\n    def sortArray(self, nums: List[int]) -> List[int]:
\n# Complexity\n- Time complexity:\n $$O(n)$$ \n\n- Space complexity:\n $$O(n)$$ \n\n# Code\n```js\nclass Solution:\n    def sortArray(self, nums: List[int]) -> List[int]:\n        arr=[0]*(10**5+1)\n        for i in nums:\n            arr[i+(50000)]+=1\n        new=[]\n        for i in range(len(arr)):\n            if arr[i]:\n                for j in range(arr[i]):\n                    new.append(i-50000)\n        return new\n```
['Python3']