easy c++ o(n) just count the positive sum
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: o(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int maxScore(vector<int>& nums) {\n        vector<int> neg;\n        long int sum=0;\n        int count=0;\n        for(auto x:nums){\n            if(x>0){\n                sum=sum+x;\n                count++;\n            }\n            else{\n                neg.push_back(x);\n            }\n        }\n        sort(neg.begin(),neg.end());\n        reverse(neg.begin(),neg.end());\n        for(auto x:neg){\n            sum=sum+x;\n            if(sum > 0){\n                count++;\n            }\n        }\n        return count;\n    }\n};\n```
['Sorting', 'Prefix Sum', 'C++']