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

Commitc8fb46d

Browse files
add 1678
1 parent16f168e commitc8fb46d

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

‎README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ _If you like this project, please leave me a star._ ★
88

99
| # | Title | Solutions | Video | Difficulty | Tag
1010
|-----|----------------|---------------|--------|-------------|-------------
11+
|1678|[Goal Parser Interpretation](https://leetcode.com/problems/goal-parser-interpretation/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1678.java)||Easy|String|
1112
|1673|[Find the Most Competitive Subsequence](https://leetcode.com/problems/find-the-most-competitive-subsequence/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1673.java)||Medium|Stack, Greedy|
1213
|1672|[Richest Customer Wealth](https://leetcode.com/problems/richest-customer-wealth/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1672.java)||Easy|Array|
1314
|1669|[Merge In Between Linked Lists](https://leetcode.com/problems/merge-in-between-linked-lists/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1669.java)||Medium|LinedList|
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
packagecom.fishercoder.solutions;
2+
3+
publicclass_1678 {
4+
publicstaticclassSolution1 {
5+
publicStringinterpret(Stringcommand) {
6+
StringBuildersb =newStringBuilder();
7+
for (inti =0;i <command.length();i++) {
8+
if (command.charAt(i) =='G') {
9+
sb.append("G");
10+
}elseif (command.charAt(i) =='(' &&command.charAt(i +1) ==')') {
11+
sb.append("o");
12+
i++;
13+
}elseif (command.charAt(i) =='(' &&command.charAt(i +1) =='a') {
14+
sb.append("al");
15+
i +=3;
16+
}
17+
}
18+
returnsb.toString();
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp