Problem 1071 · Easy

Greatest Common Divisor of Strings

Find the longest string that repeats to build both given strings, or report that none exists. A check tests whether the two strings join in both orders to the same result.

Open the interactive visualisation