Python 1 line - Easy
Intuition\n Describe your first thoughts on how to solve this problem. \nwe must first put the positive numbers then zeros then negative numbers to get the most
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nwe must first put the positive numbers then zeros then negative numbers to get the most positives numbers in the accumulation\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nfirst reverse sort the nums\nthen accumulate\nthen count the number of positive ones\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n$$O(nlog(n))$$\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n$$O(n)$$\n\n# Code\n```\nclass Solution:\n    def maxScore(self, nums: List[int]) -> int:\n        return sum(x > 0 for x in accumulate(sorted(nums, reverse=True)))\n```
['Python3']