Merge sort is a divide-and-conquer algorithm — it solves a hard problem (sorting a big array) by first breaking it into tiny problems that are trivially easy to solve (a single element is always sorted), then combining those solutions back up.
The animation shows both phases explicitly. First you will see the array being divided — split into left and right halves, again and again, until every piece is a single element. Then on the way back up, adjacent sorted pieces are merged together by comparing their smallest remaining elements one at a time.
This two-phase structure is the key insight. Watch the colour change: blue and purple show the divide phase splitting the array, yellow shows comparisons during merging, orange shows an element being placed into its correct position, and green marks a fully sorted section.
The array is split in half recursively until every sub-array contains exactly one element. A single element requires zero sorting — that is the base case.
Sorted halves are merged by comparing the front elements of each half and picking the smaller one. This produces a sorted merged result in O(n) time per level.
Unlike quicksort, merge sort's performance does not depend on the input. Best case, average case, and worst case are all O(n log n) — making it predictable and reliable.
Equal elements always maintain their original relative order. This matters when sorting objects by one field while preserving a previous sort order on another field.
TIPPause on a DIVIDE step and count the blue bars on the left and purple bars on the right — that exact split is what the recursive call operates on. Then watch the MERGE steps that follow to see those same elements get sorted and recombined.