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

Commit428a903

Browse files
refactor 1087
1 parent4bc657b commit428a903

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

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

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,6 @@
44
importjava.util.Arrays;
55
importjava.util.List;
66

7-
/**
8-
* 1087. Brace Expansion
9-
*
10-
* A string S represents a list of words.
11-
* Each letter in the word has 1 or more options. If there is one option, the letter is represented as is.
12-
* If there is more than one option, then curly braces delimit the options.
13-
* For example, "{a,b,c}" represents options ["a", "b", "c"].
14-
* For example, "{a,b,c}d{e,f}" represents the list ["ade", "adf", "bde", "bdf", "cde", "cdf"].
15-
*
16-
* Return all words that can be formed in this manner, in lexicographical order.
17-
*
18-
* Example 1:
19-
* Input: "{a,b}c{d,e}f"
20-
* Output: ["acdf","acef","bcdf","bcef"]
21-
*
22-
* Example 2:
23-
* Input: "abcd"
24-
* Output: ["abcd"]
25-
*
26-
* Note:
27-
* 1 <= S.length <= 50
28-
* There are no nested curly brackets.
29-
* All characters inside a pair of consecutive opening and ending curly brackets are different.
30-
* */
317
publicclass_1087 {
328
publicstaticclassSolution1 {
339
publicString[]expand(StringS) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp