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.
Bubblesort i believe averages O(n^2), so i believe quicksort will generally be faster. For most of the questions on here its likely not worth using a sort as the benefits wouldn't be seen on only one use of the data. I think Linq is probably a better choice then a sort in this scenario but im not 100% sure.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Birthday Cake Candles
You are viewing a single comment's thread. Return to all comments →
Bubblesort i believe averages O(n^2), so i believe quicksort will generally be faster. For most of the questions on here its likely not worth using a sort as the benefits wouldn't be seen on only one use of the data. I think Linq is probably a better choice then a sort in this scenario but im not 100% sure.