Problem 648 · Medium

Replace Words

Replace each word in a sentence with the shortest dictionary root that it starts with. The visual checks each prefix of a word against the root set and swaps in the first match.

Open the interactive visualisation