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.
But isn't the question asking # min swaps when using bubble sort? Sure merge sort would have O(nlogn) worst case and get the MINIMUM number of swaps but I think it's diff from what the question is asking.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sorting: Bubble Sort
You are viewing a single comment's thread. Return to all comments →
But isn't the question asking # min swaps when using bubble sort? Sure merge sort would have O(nlogn) worst case and get the MINIMUM number of swaps but I think it's diff from what the question is asking.