def max_subarray(A):. # (maximum sum, max sum start idx, max sum end idx). result = (-float('inf'), 0, 0). current_max_sum = 0. current_start_idx = 1.
確定! 回上一頁