If we find a 0 in our sorted array , we stop
if ( arr [ i ] >= 0 ) : NEW_LINE INDENT k = 0 NEW_LINE DEDENT else : NEW_LINE INDENT arr [ i ] = ( - 1 ) * arr [ i ] NEW_LINE k = k - 1 NEW_LINE DEDENT i += 1 NEW_LINE