✅C++ || Beginner Friendly || EASY CODE || SORTING
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\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int maxScore(vector<int>& nums) {\n        long int sum=0;\n        int n=nums.size(),count=0;\n        sort(nums.rbegin(),nums.rend());\n        for(int i=0;i<n;i++)\n        {\n            sum += nums[i];\n            if(sum>0)\n            {\n                count++;\n            }\n        }\n        return count;\n    }\n};\n```
['C++']