← ALL NOTES
Array

2179. Count Good Triplets in an Array

Two permutations of 0..n−1: nums1 and nums2. A good triplet is a set of values (x, y, z) appearing in the same relative order (x before y before z) in both permutations. Count good triplets. Remap to…

Loading…