Merge sort

Merge sort splits an array in half again and again until each piece has one element, then merges pairs of sorted pieces back into larger sorted ones, the whole job done by a method that calls itself on each half.

From AP Computer Science A.