Given an array of unique integers and a sum value, can you use python to find the number of triplets with a sum smaller than the given value?
Example:
Array of integers = {5, 1, 3, 4, 7}
Value = 12
Solution: 4 (e.g. the output of your code)
Explanation: There are 4 triplets that have a sum less than 12: (1, 3, 4), (1, 3, 5), (1, 3, 7), and (1, 4, 5)