July 2018
Beginner
202 pages
5h 4m
English
Although the quicksort on average is pretty fast, it still has the theoretical worst time complexity of O(n²). In this section, we shall examine another sorting algorithm, called merge sort, in which the worst time complexity is O(n log n). Similar to quick sort, merge sort belongs to the divide and conquer class of algorithms.
Merge sort can be summarized in three simple steps as follows:
In the following section, we will develop the preceding steps gradually, at each turn slowly building our understanding of how merge sorting works.
Read now
Unlock full access