Explained - Sort & positive sum count || Very simple & Easy to Understand Solution
Approach \nHere we need to check for the total prefix sum > 0.\nTo do this all the positive number should be at the begining\nso that the total possible sum mus
# Approach \nHere we need to check for the total prefix sum > 0.\nTo do this all the positive number should be at the begining\nso that the total possible sum must be maximum and after that we need to remove the -ve numbers from the smaller ones. \n\nSo we need to just sort it and start adding the elements and counting it \nuntill we get the sum as -ve or zero.\n\n# Code\n```\n    int maxScore(vector<int>& nums) {\n        long long ans = 0, sum = 0;\n        sort(nums.begin(), nums.end());\n        for(int i = nums.size()-1; i >= 0; --i){\n            sum += nums[i];\n            if(sum > 0) ans++;\n            else break;\n        }\n        return ans;\n    }\n```
['C++']