Linear-time algorithm for solving a set of inequalites We have a set $A$ of $n$ distinct numbers. We want to determine for all  $x,y,z \in A$ whether the following relations hold.

$$
x+y&gt;z\qquad x+z&gt;y\qquad y+z&gt;x 
$$

Anyone could describe $O(n)$ Algorithm?
for this algorithm it's enough to check sum of two smallest element is bigger than the maximum element.

We find Min1, Min2, Max.

if Min1 + Min2 &lt; Max there is no. O(n)
else all of them is true.