Counting inversions hw.