Data Structures/Algorithm Implementations

Count inversion pair in array range 1 to n

Problems:

Give an array[1..n], a pair call inversion if with i, j (1 <= i  array[j]) counting how many inversions pair?

Solution: Use divide and conquer (Hint: same with merge sort)

C++ source code: