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

Commit80f94ad

Browse files
refactor 1047
1 parent5adecd4 commit80f94ad

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

‎src/main/java/com/fishercoder/solutions/_1047.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-
* 1047. Remove All Adjacent Duplicates In String
5-
*
6-
* Given a string S of lowercase letters, a duplicate removal consists of choosing two adjacent and equal letters, and removing them.
7-
*
8-
* We repeatedly make duplicate removals on S until we no longer can.
9-
*
10-
* Return the final string after all such duplicate removals have been made. It is guaranteed the answer is unique.
11-
*
12-
*
13-
*
14-
* Example 1:
15-
*
16-
* Input: "abbaca"
17-
* Output: "ca"
18-
* Explanation:
19-
* For example, in "abbaca" we could remove "bb" since the letters are adjacent and equal, and this is the only possible move.
20-
* The result of this move is that the string is "aaca", of which only "aa" is possible, so the final string is "ca".
21-
*
22-
*
23-
* Note:
24-
*
25-
* 1 <= S.length <= 20000
26-
* S consists only of English lowercase letters.*/
273
publicclass_1047 {
284
publicstaticclassSolution1 {
295
publicStringremoveDuplicates(StringS) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp