File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Hard/longest_valid_parentheses Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments