Problem 912 · Medium

Sort an Array

Merge sort: split the range in halves, sort each, then merge by repeatedly taking the smaller front element.

Open the interactive visualisation