✅Easy Java solution||Intuition||Sort||Beginner Friendly🔥
Intuition\n Describe your first thoughts on how to solve this problem. \nFirst of all sort the array and then Get the prefix sums of the array and then just cou
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n**First of all sort the array and then Get the prefix sums of the array and then just count the total number of positive integer in the prefix array**\n\n# Code\n```\nclass Solution {\n    public int maxScore(int[] nums) {\n        Arrays.sort(nums);\n        int count = 0;\n        long sum = 0;\n        for(int i = nums.length - 1; i >= 0; i --){\n            sum += nums[i];\n            if(sum > 0){\n                count++;\n            }\n        }\n        return count;\n    }\n}\n```\n**If you really found my solution helpful please upvote it, as it motivates me to post such kind of codes and help the coding community, if you have some queries or some improvements please feel free to comment and share your views.**
['Java']