set of n points on the X axis
$ arr = array ( 1 , 2 , 3 , 4 ) ; $ n = sizeof ( $ arr ) ; $ L = 3 ; $ ans = countTripletsLessThanL ( $ n , $ L , $ arr ) ; echo " Total ▁ Number ▁ of ▁ ways ▁ = ▁ " , $ ans , " STRNEWLINE " ; ? >