Skip to content

Commit 5833f20

Browse files
refactor 20
1 parent bde2372 commit 5833f20

File tree

1 file changed

+0
-32
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-32
lines changed

src/main/java/com/fishercoder/solutions/_20.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,6 @@
22

33
import java.util.Stack;
44

5-
/**
6-
* 20. Valid Parentheses
7-
*
8-
* Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
9-
*
10-
* An input string is valid if:
11-
*
12-
* 1. Open brackets must be closed by the same type of brackets.
13-
* 2. Open brackets must be closed in the correct order.
14-
*
15-
* Note that an empty string is also considered valid.
16-
*
17-
* Example 1:
18-
* Input: "()"
19-
* Output: true
20-
*
21-
* Example 2:
22-
* Input: "()[]{}"
23-
* Output: true
24-
*
25-
* Example 3:
26-
* Input: "(]"
27-
* Output: false
28-
*
29-
* Example 4:
30-
* Input: "([)]"
31-
* Output: false
32-
*
33-
* Example 5:
34-
* Input: "{[]}"
35-
* Output: true
36-
* */
375
public class _20 {
386
public static class Solution1 {
397
public boolean isValid(String s) {

0 commit comments

Comments
 (0)