Hackerrank - Beautiful Triplets Solution
Given a sequence of integers , a triplet is beautiful if:
Given an increasing sequence of integers and the value of , count the number of beautiful triplets in the sequence.
For example, the sequence and . There are three beautiful triplets, by index: . To test the first triplet, and .
Function Description
Complete