Skip to content

Commit ecf35d8

Browse files
committed
Runtime: 1644 ms (Top 5.15%) | Memory: 43.1 MB (Top 65.80%)
1 parent cd5aae4 commit ecf35d8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/algorithms/L/Longest Valid Parentheses/Longest Valid Parentheses.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 1644 ms (Top 5.15%) | Memory: 43.1 MB (Top 65.80%)
12
class Solution {
23
public int longestValidParentheses(String s) {
34
int i=0;
@@ -12,11 +13,11 @@ public int longestValidParentheses(String s) {
1213
if(ch==')') closed++;
1314
if(closed>open) break;
1415
if(open==closed) len=Math.max(len,j-i+1);
15-
16+
1617
j++;
1718
}
1819
i++;
1920
}
2021
return len;
2122
}
22-
}
23+
}

0 commit comments

Comments
 (0)