Count number of triplets in an array having sum in the range [a, b]
Given an array of distinct integers and a range [a, b], the task is to count the number of triplets having a sum in the range [a, b].Examples: Input : arr[] = {8, 3, 5, 2} range = [7, 11] Output : 1 There is only one triplet {2, 3, 5} having sum 10 in range [7, 11]. Input : arr[] = {2, 7, 5, 3, 8, 4