Merge algorithm: Difference between revisions

Content deleted Content added
m Enum 2 author/editor WLs; WP:GenFixes on
Line 4:
== Application ==
[[File:Merge sort algorithm diagram.svg|thumb|upright=1.5|An example for merge sort]]
The merge algorithm plays a critical role in the [[merge sort]] algorithm, a [[comparison sort|comparison-based sorting algorithm]]. Conceptually, the merge sort algorithm consists of two steps:
 
# [[Recursion (computer science)|Recursively]] divide the list into sublists of (roughly) equal length, until each sublist contains only one element, or in the case of iterative (bottom up) merge sort, consider a list of ''n'' elements as ''n'' sub-lists of size 1. A list containing a single element is, by definition, sorted.