Available question text
Count how many permutations of 1..n have exactly k inverse pairs (inversions). This is a combinatorics/DP counting problem (answer mod 1e9+7) with n,k up to 1000, requiring efficient recurrence or prefix-sum optimization to compute counts.
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 629. K Inverse Pairs Array
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source