Count Good Triplets In An Array Leetcode Question