Ads
有無大佬比d tips細佬,點解我段code有bug?:^((個test case 係accepted的) :^(line 8係O(n) Worst-case example: [1, -1, -1, -1, -1, -1, -1, ...] 轉用greedy algorithm + 計running sum 最大既數同最大既subarray係無關係 [3, -8, 1, 1, 1, 1]
有無大佬比d tips細佬,點解我段code有bug?:^((個test case 係accepted的) :^(