Count Good Triplets in an Array
Count value triples that appear in the same relative order in two permutations. The visual maps positions in the second permutation and counts the matching left and right pairs for each middle value.
Count value triples that appear in the same relative order in two permutations. The visual maps positions in the second permutation and counts the matching left and right pairs for each middle value.