BEATS 93%
Code
# Code
```java []
class Solution {

    public int maxScore(int[] nums) {
        Arrays.sort(nums);
        int count = 0;
        int pos = nums.length - 1;
        long currentSum = 0;
        while (pos >= 0 && currentSum + nums[pos] > 0) {
            currentSum += nums[pos];
            count++;
            pos--;
        }
        return count;
    }
}
```
['Java']