Count Possible Triangles
Given an unsorted array arr of n positive integers. Find the number of triangles that can be formed with three different array elements as lengths of three sides of triangles.
3 <= n <= 10^3 1 <= arr[i] <= 10^3
Input is managed for you
Output is managed for you
5 6 4 9 7 8