Count Inversions in an array

Basic solution O(n^2) - bubble sort and insertion sort logic
Week 1: Stanford’s “Algorithms: Design and Analysis, Part 1
by Tim Roughgarden” on coursera.