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.
@louisjarvis, I think the better and simpler approach is to use Collections.sort(List, Comparator) utility method which will do the work for us. We can implement the Comparator as suggested by @davejlin.
We (programmers) already know the mergesort algorithm so I think utility method its simpler to understand and implement.
I also like your solution.
Regards
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Big Sorting
You are viewing a single comment's thread. Return to all comments →
@louisjarvis, I think the better and simpler approach is to use Collections.sort(List, Comparator) utility method which will do the work for us. We can implement the Comparator as suggested by @davejlin.
We (programmers) already know the mergesort algorithm so I think utility method its simpler to understand and implement.
I also like your solution.
Regards