Adding count inversions code for Algos-1 assignment