Problem 1592 · Easy

Rearrange Spaces Between Words

Spread the spaces evenly between words and put any leftover spaces at the end. The visual shows the gaps between words being redistributed.

Open the interactive visualisation