We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
what you described is not a merge sort algorithm.
seems the author of the task wants two conflicted things:
1. calculate Insert Sort swaps
2. but to provide O(n*log(n)) complexity (use e.g. MergeSort )
is not it?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Merge Sort: Counting Inversions
You are viewing a single comment's thread. Return to all comments →
what you described is not a merge sort algorithm. seems the author of the task wants two conflicted things: 1. calculate Insert Sort swaps 2. but to provide O(n*log(n)) complexity (use e.g. MergeSort )
is not it?