if element is present then swapped
if ( sortarr [ i ] == arr [ j ] ) : NEW_LINE INDENT arr [ i ] , arr [ j ] = arr [ j ] , arr [ i ] NEW_LINE flag = 1 NEW_LINE break NEW_LINE DEDENT if ( j + k >= n ) : NEW_LINE INDENT break NEW_LINE DEDENT