It is not hard to see that the min-max value is $\sqrt n$.