Calculating the maximum contiguous array for every length j , j is from 1 to lengtn of the array
j = 1 NEW_LINE while j <= len and j <= 6 : NEW_LINE INDENT for k in range ( 1 , len + 1 ) : NEW_LINE INDENT if ( j + k - 1 <= len ) : NEW_LINE INDENT maxsum [ j ] = max ( maxsum [ j ] , current_arr [ j + k - 1 ] - current_arr [ k - 1 ] ) NEW_LINE DEDENT DEDENT j += 1 NEW_LINE DEDENT