Merge Sort: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * Data Structures and Algorithms * Sorting Algorithms =Overview=") |
|||
Line 5: | Line 5: | ||
=Overview= | =Overview= | ||
Merge sort is a [[Data Structures and Algorithms#Divide_and_Conquer|divide-and-conquer]] algorithm that sorts an input array as follows: | |||
# '''Divide''': it divides the initial array into two roughly equal sub-arrays | |||
# '''Conquer''': it calls itself recursively to sort the sub-arrays | |||
# '''Combine''': it merges the two sorted sub-arrays to produce the sorted answer |
Revision as of 23:19, 6 August 2018
Internal
Overview
Merge sort is a divide-and-conquer algorithm that sorts an input array as follows:
- Divide: it divides the initial array into two roughly equal sub-arrays
- Conquer: it calls itself recursively to sort the sub-arrays
- Combine: it merges the two sorted sub-arrays to produce the sorted answer