2. Inversion Count #
Created Monday 22 June 2020
- Simply calculate the problems in the array while sorting. We do the comparisons anyway. Same as that for merge sort.
- A simple method is to sort and iterate. Easier to code.
- Another method is to a variable which counts the inversions. Implementing merge sort again.