Function to return the minimum number of operations required to convert the given array to an increasing AP series with common difference as 1
def minOperations ( arr , n ) : NEW_LINE INDENT start = arr [ n - 1 ] ; NEW_LINE end = max ( arr ) + n ; NEW_LINE max_arr = 0 ; NEW_LINE DEDENT