All Stories published by 100 days of algorithms on April 12, 2017

Day 19: Counting inversions

Count of inversions in array is a textbook showcase of what is the difference between quadratic and linearithmic algorithm.

While naive method may select each tuple of items to be compared, more efficient approach is to adapt merge-sort to do the counting…

About
100 days of algorithms
100 days, 100 algorithms - a challenge consisting of many small pieces
More information
Tags
Editors