Merge Sort
Last updated
What is Merge Sort?
Merge sort is a type of sorting algorithm that follows the divide-and-conquer paradigm. It was invented by John von Neumann in 1945. This algorithm works by dividing an unsorted list into n partitions, each containing one element (a list of one element is considered sorted), then repeatedly merging partitions to produce new sorted lists until there is only 1 sorted list remaining. This resulting list is the fully sorted list. The process of dividing the list is done recursively until it hits the base case of a list with one item. Merge sort has a time complexity of O(n log n) for all cases (best, average and worst), which makes it highly efficient for large data sets.
Free resources to learn Merge Sort
- ArticleMerge Sort Visualize
- VideoMerge Sort
More in stage 9: Graph Data Structures
Merge Sort: common questions
Can I learn Merge Sort in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Merge Sort in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Merge Sort tutorial for beginners?
It is lesson 46 of 107 in the free Data Structures & Algorithms roadmap, in stage 9, Graph Data Structures. If you are new to Data Structures & Algorithms, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.