( left + 1 ) : Count of elements removed from the left ( N - right ) : Count of elements removed from the right
if ( leftTaken + rightTaken > ( left + 1 ) + ( N - right ) ) : NEW_LINE INDENT leftTaken = left + 1 NEW_LINE rightTaken = N - right NEW_LINE DEDENT break NEW_LINE