Remember selection sort and insersion sort? These simple sorting algorithms are convenient to use when sorting a small amount of data. However, their runtime complexity is O(n2), which makes them very slow when sorting a lot of data. Can we sort more efficiently? Take a look at the following list of n integers. Can you think of a way to sort them faster than O(n2)?
[45, 31, 5, 12, 8, 67, 9, 20, 22]
We have used the divide and conquer strategy to make searching faster.
Can we use divide and conquer in sorting? Think of it for a moment before moving to the next page.