Simple python3 O(nlog(n)) solution
\n# Code\n\nclass Solution:\n    def maxScore(self, nums: List[int]) -> int:\n        nums.sort(reverse=True)\n        s = 0\n        for i, n in enumerate(nums
\n# Code\n```\nclass Solution:\n    def maxScore(self, nums: List[int]) -> int:\n        nums.sort(reverse=True)\n        s = 0\n        for i, n in enumerate(nums):\n            s += n\n            if s <= 0:\n                return i\n        return len(nums)\n        \n```\n\n# Complexity\n- Time complexity: O(nlog(n))\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
['Python3']