Hi I'm having difficulty solving this problem in O(N) time.
The input consists of N integers of values between 1 - 10^9 and the output should determine if it is possible to form a triangle using any 3 of the values given. The limits of N reach to 10^8 so I the solution has to run in O(N) time.
So i know about the triangle inequality but using the inequality to compare all the numbers will take run in O(NC3) time which will exceed the complexity allowed? Can I get some help on the correct solution?