Problem 2746 · Medium
Track the shortest result for each pair of first and last letters as each word is joined on either side.
Open the interactive visualisation