The two sorting algorithms we've seen so far, selection sort and insertion sort, have worst-case running times of Θ(n2). When the size of the input array is large, these algorithms can take a long time to run. In this tutorial and the next one, we'll see two other sorting algorithms, merge sort and quicksort, whose running times are better. In particular, merge sort runs in Θ(nlogn) time in all cases, and quicksort runs in Θ(nlogn) time in the best case and on average, though its worst-case running time is Θ(n2).Here's a table of these four sorting algorithms and their running times: