Tag: LeetCode: 1071 Greatest Common Divisor of Strings
-
LeetCode: 1071 Greatest Common Divisor of Strings
•
For two strings s1 and s2, we say "s1 divides s2" if and only if s2 is formed by concatenating one or more copies of s1. Given two strings str1 and str2, return the largest string x such that x divides both str1 and str2. Example: Input: str1 = "ABCABC",…