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

Commita2d91bb

Browse files
refactor 1003
1 parenta84a51d commita2d91bb

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,6 @@
33
importjava.util.ArrayDeque;
44
importjava.util.Deque;
55

6-
/**
7-
* 1003. Check If Word Is Valid After Substitutions
8-
*
9-
* We are given that the string "abc" is valid.
10-
*
11-
* From any valid string V, we may split V into two pieces X and Y such that X + Y (X concatenated with Y) is equal to V. (X or Y may be empty.) Then, X + "abc" + Y is also valid.
12-
*
13-
* If for example S = "abc", then examples of valid strings are: "abc", "aabcbc", "abcabc", "abcabcababcc". Examples of invalid strings are: "abccba", "ab", "cababc", "bac".
14-
*
15-
* Return true if and only if the given string S is valid.
16-
*
17-
* Note:
18-
* * 1 <= S.length <= 20000
19-
* * S[i] is 'a', 'b', or 'c'
20-
*/
21-
226
publicclass_1003 {
237
publicstaticclassSolution1 {
248
publicbooleanisValid(StringS) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp