Simple Fast C (15 ms ) only sort negative number
# Intuition\nTriage number \nSort negative number\n\n\n# Complexity\n- Time complexity: O(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\n# Code\n```c []\nint cmp(const void* a, const void* b) { return (*(int*)b - *(int*)a); }\n\nint maxScore(int* nums, int numsSize) {\n    long score=0;\n    long nScore=0;\n    int count=0;\n    int idx=0;\n    //first triage number \n    // positive and 0 goes into score and vanish \n    // negative stay in nums starting from position 0\n    for (int i=0;i<numsSize;i++) {\n        if (nums[i]>=0) {\n            count++;\n            score+=nums[i];\n        } else {\n            nScore+=nums[i];\n            nums[idx++]=nums[i];\n        }\n    }\n    // No positive number we can exit the program\n    if (score==0) {\n        return 0;\n    }\n    //all number are part of the prefix no need to calculate\n    if (score+nScore>0) {\n        return numsSize;\n    }\n    //only sort negative number that remain in nums\n    qsort(nums, idx, sizeof(int), cmp);\n    //check if score goes under 0 that the end of prefix index\n    for (int i=0;i<idx;i++) {\n        score+=nums[i];\n        if (score<=0) {\n            return count+i;\n        }\n    }\n    return 1337;\n}\n```
['Divide and Conquer', 'C', 'Sorting']