set of n points on the X axis
int [ ] arr = { 1 , 2 , 3 , 4 } ; int n = arr . length ; int L = 3 ; int ans = countTripletsLessThanL ( n , L , arr ) ; System . out . println ( " Total ▁ Number ▁ of ▁ ways ▁ = ▁ " + ans ) ; } }