Counting the inversions in an Array

This is my implementation for counting the inversions in an Array.

I was really amazed to find that counting inversions in an array is used in collaborative filtering i.e for generating recommendations for a new user.

Now I am getting that Codejam problem called Rope Intranet which is about finding the Inversions of the second building values as the first building values will be given in a sorted order.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s