“Easy” and “Difficult” Problems
In the previous chapter we reviewed two algorithms to sort the n elements contained in a vector C[0 : n−1]: INSERTION SORT and MERGE SORT, which belong to the Olympus of classical algorithms. The first one, built according to a simple strategy, has a time complexity proportional to n2; the second one, which is more sophisticated, has a time complexity proportional to n log2 n, and is thus more efficient than the first.
Unable to display preview. Download preview PDF.