Available question text
Count the number of value triplets (x,y,z) in two permutations of 0..n−1 such that the indices of x,y,z are strictly increasing in both arrays (they form a common increasing subsequence of length three). With n up to 1e5, you need an efficient sub-quadratic counting approach rather than brute-force enumeration.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2179. Count Good Triplets in an Array
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source