C++ Easy Solution || Easy to understand ✅✅
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:\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        \n        sort(begin(nums),end(nums),greater<>());\n        \n        long long sum = 0, res = 0;\n        \n        for(int i=0; i<nums.size(); i++){\n            sum += nums[i];\n            if(sum > 0)\n                res++;\n            else\n                break;\n        }\n        \n        return res;\n    }\n};\n```
['C++']