← ALL NOTES
Array

611. Valid Triangle Number

Count triples that can form a non-degenerate triangle (each pair of sides sums to more than the third). The simplification that makes this tractable: sort the array, and for a sorted triple a <= b <=…

Loading…