Problem 2179 · Hard

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.

Open the interactive visualisation