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.
If you're confused about the reason why it's still timeout with the usage of merge sort, you can consider to turn the creation of the helper vector to a reference in the parameter list of merge sort funtion to reduce the time spent on creation.
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 →
If you're confused about the reason why it's still
timeout
with the usage of merge sort, you can consider to turn the creation of the helper vector to a reference in the parameter list of merge sort funtion to reduce the time spent on creation.