Find minimum element in array for current operation and modify it i . e ; arr [ j ] -- > - arr [ j ]
for j in range ( n ) : NEW_LINE INDENT if ( arr [ j ] < min ) : NEW_LINE INDENT min = arr [ j ] NEW_LINE index = j NEW_LINE DEDENT DEDENT