mergesort
Recursive halving method
Mergesort is a sorting algorithm that works by repeatedly dividing a list in half until each piece contains one element, then merging the pieces back together in sorted order.
It's efficient and predictable—always taking the same time regardless of how the input is arranged—but requires extra memory for the merging step.
Mergesort guarantees O(n log n) performance.
Process invoking itself
- in-placeProperly positioned already
- bottom-upStarting from fundamentals
- top-downDirected from highest level
- subproblemDivided portion of challenge
Separation into parts
- halveDivide into two
- partitionBarrier separating spaces
- subdivideSplit into smaller portions
- bisectDivide into two equal portions
decomposition · subarray · sublist · midpoint · index · depth · branching
Merge, or harvesting machine
- interleaveInsert alternately between others
- two-pointerBasket worth deuce
- comparisonAssessment of similarities
- reunificationRestoring divided unity
recursion
Process invoking itself
split
Separation into parts
bisect · decomposition · subarray · sublist · midpoint · index · depth · branching
combine
Merge, or harvesting machine
- interleaveInsert alternately between others
- two-pointerBasket worth deuce
- comparisonAssessment of similarities
key-value
Data pair structure
- deterministicCompletely caused by prior conditions