8000 add file · AldythNahak/leetcode@1f43b4a · GitHub
[go: up one dir, main page]

Skip to content

Commit 1f43b4a

Browse files
committed
add file
1 parent 502b345 commit 1f43b4a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package longest_valid_parentheses;
2+
3+
class Solution {
4+
public int longestValidParentheses(String s) {
5+
// int
6+
7+
}
8+
}
9+
10+
public class longest_valid_parentheses {
11+
public static void main(String[] args) {
12+
Solution solution = new Solution();
13+
14+
System.out.println(solution.longestValidParentheses("(()")); //2
15+
System.out.println(solution.longestValidParentheses(")()())")); //4
16+
System.out.println(solution.longestValidParentheses("")); //0
17+
System.out.println(solution.longestValidParentheses("()(()")); //2
18+
System.out.println(solution.longestValidParentheses("()(())")); //6
19+
System.out.println(solution.longestValidParentheses("()")); //6
20+
}
21+
}

0 commit comments

Comments
 (0)
0