Skip to content

Commit b3a4122

Browse files
refactor 1071
1 parent adb30ba commit b3a4122

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

src/main/java/com/fishercoder/solutions/_1071.java

-24
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 1071. Greatest Common Divisor of Strings
5-
*
6-
* For strings S and T, we say "T divides S" if and only if S = T + ... + T (T concatenated with itself 1 or more times)
7-
* Return the largest string X such that X divides str1 and X divides str2.
8-
*
9-
* Example 1:
10-
* Input: str1 = "ABCABC", str2 = "ABC"
11-
* Output: "ABC"
12-
*
13-
* Example 2:
14-
* Input: str1 = "ABABAB", str2 = "ABAB"
15-
* Output: "AB"
16-
*
17-
* Example 3:
18-
* Input: str1 = "LEET", str2 = "CODE"
19-
* Output: ""
20-
*
21-
* Note:
22-
*
23-
* 1 <= str1.length <= 1000
24-
* 1 <= str2.length <= 1000
25-
* str1[i] and str2[i] are English uppercase letters.
26-
* */
273
public class _1071 {
284
public static class Solution1 {
295
public String gcdOfStrings(String str1, String str2) {

0 commit comments

Comments
 (0)