Clean code && Kata Frequency Queries

Clean code: E19 Advanced TDD: 31:38

Given a triplet form by i,j,k elements in the arr
Looping the array in order guarantee that the elements you found in the triplet are in order i<j<k

Its think about king of as recursive way:
Give that the number of triples found for n-1 array elements is "counter", what would I have to do to find the final number?

I would have to add all the combinations where the current element is the third of the triplet.

How do know if an element is the third of the triplet?

All the combinationss found for the second of the triplet

Started frequency queries

Comments