1071. Greatest Common Divisor of Strings
Description
**Input:** str1 = "ABCABC", str2 = "ABC"
**Output:** "ABC"**Input:** str1 = "ABABAB", str2 = "ABAB"
**Output:** "AB"**Input:** str1 = "LEET", str2 = "CODE"
**Output:** ""**Input:** str1 = "ABCDEF", str2 = "ABC"
**Output:** ""ac
Last updated