An inversion of an array A[1..n] is a pair of indices (i,j) such that 1≤i<j≤n and A[i]>A[j].
The number of inversions shows how far the array is from being sorted: if it is already sorted then there are no
inversions while if it sorted in reverse order then the number of inversions is maximal.
Report a typo
Page:
Context:
Flag as inappropriate
Are you sure you want to flag this comment as inappropriate?
Welcome to Rosalind!
Rosalind is a platform for learning bioinformatics through problem solving.
Please login with Google/Twitter/Facebook or
register a new account.