Track The Presum>0 Item Numbers
Intuition
Be careful: The score of nums is the number of positive integers in the array prefix.
Sort array and preSum in decreasing order.
ApproachComplexity
Ti
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
1. Be careful: The score of nums is the number of positive integers in the array prefix.
2. Sort array and preSum in decreasing order.
# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```csharp []
public class Solution {
    public int MaxScore(int[] nums) {
        int len = nums.Length;
        Array.Sort(nums);
        long preSum = 0;
        for(int i = len-1; i >= 0; i--)
        {
            preSum += nums[i];

            if(preSum <= 0)
                return len-i-1;
        }

        return len;
    }
}
```
['C#']