Implementing Sorting
Intuition\n Describe your first thoughts on how to solve this problem.  Array, Sorting\n\n# Approach\n Describe your approach to solving the problem. \n1. Sort 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. --> Array, Sorting\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1. Sort the array according to descending order.\n2. Initialize a variable prefix_sum and an array prefix to count the values and store it in an array prefix.\n3. Count the positive prefix values and return\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->O(n)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->O(1)\n\n# Code\n```python3 []\nclass Solution:\n    def maxScore(self, nums: List[int]) -> int:\n        nums.sort(reverse=True)\n        summ = 0\n        prefix_sum = []\n\n        \n\n        for i in range(len(nums)):\n               summ += nums[i]\n               prefix_sum.append(summ)\n       \n        pos_count = 0\n        for x in prefix_sum:\n            if x > 0:\n                pos_count += 1\n        return pos_count         \n```
['Python3']