& Partial Sortedness">

Inversions & Partial Sortedness

Posted by Beetle B. on Tue 05 August 2014

An inversion in a list of elements is a pair of elements where the 2nd element is smaller than the first (i.e. the 2nd element would be on the left of the 1st element if the list were sorted).

A partially sorted list is one where the number of inversions is roughly of the order of \(N\), or \(i<cN\) where \(i\) is the number of inversions.