A zero-indexed array *A* consisting of *N* integers is given. A triplet (*P* , *Q*, *R*) is triangular if [image: $0 \leq P < Q < R < N$] and *A*[*P*] + *A*[*Q*] > *A*[*R*], *A*[*Q*] + *A*[*R*] > *A*[*P*], *A*[*R*] + *A*[*P*] > *A*[*Q*].
For example, consider array *A* such that A[0] = 10 A[1] = 2 A[2] = 5 A[3] = 1 A[4] = 8 A[5] = 20 Triplet (0, 2, 4) is triangular. -- Thanks and Regards, Raghavan KL -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
