Which Sorting Algorithm Should I Use? It depends. Each algorithm comes with its own set of pros and cons. Quicksort is a good default choice. It tends to be fast in practice, and with some small tweaks its dreaded worst-case time complexity becomes very unlikely. A tried and true favorite. Heapsort is a good choice if you can't tolerate a worst-case time complexity of or need low space costs. The