Introduction to merge sort
Merge sort is one of the most efficient and widely used sorting algorithms. It is a general-purpose comparison-based sort that uses a divide-and-conquer approach under the hood. It works by recursively dividing the input list into smaller sublists, sorting each, and merging them to produce a single list.
Example
Continuing from the quicksort example, imagine you are a librarian tasked with organising a large collection of books in alphabetical order by title.
Liking the course? Check our discounted plans to continue learning.