Valid Triangle Number
Problem In the Valid Triangle Number problem, we have given an array of non-negative integers. Find the number of triplets that can form a triangle. If we consider the numbers in the array as side lengths of the triangle. Example Input [ 2, 2, 3, 4 ] Output 3 Explanation We …