Simple c++ soln ||  sort fn ||  prefix sum
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nusing sort function and
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nusing sort function and iterating aproach \n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(nlogn)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n\n# Code\n```\nclass Solution {\npublic:\n    int maxScore(vector<int>& nums) {\n        sort(nums.rbegin(), nums.rend());\n        long long sum = 0;\n        int score = 0;\n        for (int i = 0; i < nums.size(); i++) {\n            sum += nums[i];\n            if (sum > 0) {\n                score++;\n            }\n        }\n        return score;\n    }\n};\n\n```
['Greedy', 'Sorting', 'Prefix Sum', 'C++']