[Inversions] count inversions for n*log(n) time