Easy Problemscountingcombinatoricsgrid

Permutations with K Inversions

An inversion in a permutation of the numbers 1 through n is a pair of positions where a larger value sits before a smaller one. Count how many permutations of 1 through n contain exactly k inversions.

Do this lesson first: climbing stairs

The full breakdown and animated table for this problem are still being written. In the meantime, run the four questions on it yourself — that is the whole exercise.