C++ || EASY || SORTING
\n\n# Complexity\n- Time complexity: O(n logn)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(1)\n Add your space complexity here, e.g. O(
\n\n# Complexity\n- Time complexity: $$O(n logn)$$\n<!-- Add your time complexity here, e.g. $$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        sort(nums.begin(),nums.end());\n        int cnt=0;\n        long long sum=0;\n        for(int i=nums.size()-1;i>=0;i--)\n        {\n            sum+=nums[i];\n            if(sum>0)\n                cnt++;\n        }\n        return cnt;\n        \n    }\n};\n```
['C++']