Embed presentation
Download to read offline



Merge-sort uses a divide-and-conquer approach to sort a list of elements. It divides the unsorted list into halves until each sub-list contains a single element, recursively sorting each sub-list from smallest to largest. It then merges the sorted sub-lists back together into a single sorted list. The divide-and-conquer pattern consists of dividing the problem into sub-problems of smaller input sizes, conquering the sub-problems by solving them recursively, and combining the results into the solution for the original problem.


