Problem 75 · Medium

Sort Colors

Sort an array holding three values in place with a single pass. The visual keeps three regions moving boundaries as elements are swapped into place.

Open the interactive visualisation