DSA Key Problems

Count Inversions

Count index pairs where the earlier value is greater than the later value.