Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 80f94ad

Browse files
refactor 1047
1 parent 5adecd4 commit 80f94ad

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
package com.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
public class _1047 {
284
public static class Solution1 {
295
public String removeDuplicates(String S) {

0 commit comments

Comments
 (0)