Found 1 repositories(showing 1)
dollyrajpoot07
Given an unsorted array of positive integers, find the number of triangles that can be formed with three different array elements as three sides of triangles. For a triangle to be possible from 3 values, the sum of any of the two values (or sides) must be greater than the third value (or third side). Examples: Input: arr = {4, 6, 3, 7} Output: 3
All 1 repositories loaded