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

Commitd581569

Browse files
refactor 1190
1 parentb76212e commitd581569

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

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

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

7-
/**
8-
* 1190. Reverse Substrings Between Each Pair of Parentheses
9-
*
10-
* You are given a string s that consists of lower case English letters and brackets.
11-
* Reverse the strings in each pair of matching parentheses, starting from the innermost one.
12-
* Your result should not contain any brackets.
13-
*
14-
* Example 1:
15-
* Input: s = "(abcd)"
16-
* Output: "dcba"
17-
*
18-
* Example 2:
19-
* Input: s = "(u(love)i)"
20-
* Output: "iloveu"
21-
* Explanation: The substring "love" is reversed first, then the whole string is reversed.
22-
*
23-
* Example 3:
24-
* Input: s = "(ed(et(oc))el)"
25-
* Output: "leetcode"
26-
* Explanation: First, we reverse the substring "oc", then "etco", and finally, the whole string.
27-
*
28-
* Example 4:
29-
* Input: s = "a(bcdefghijkl(mno)p)q"
30-
* Output: "apmnolkjihgfedcbq"
31-
*
32-
* Constraints:
33-
* 0 <= s.length <= 2000
34-
* s only contains lower case English characters and parentheses.
35-
* It's guaranteed that all parentheses are balanced.
36-
* */
377
publicclass_1190 {
388
publicstaticclassSolution1 {
399
publicStringreverseParentheses(Strings) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp