Problem 2733 · Easy

Neither Minimum nor Maximum

Return any element that is neither the minimum nor the maximum of distinct positive integers, or -1 if none exists.

Open the interactive visualisation