Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb3a4122

Browse files
refactor 1071
1 parentadb30ba commitb3a4122

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

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

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
packagecom.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
publicclass_1071 {
284
publicstaticclassSolution1 {
295
publicStringgcdOfStrings(Stringstr1,Stringstr2) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp