Count inversions in a permutation | Hudson Interview Question