Inversions in Array