Inversions in an array. Ok Tested.