@@ -0,0 +1,551 @@
+public class Solution %7B%0A    public int longestValidParentheses(String s) %7B%0A        int n = s.length();%0A        int%5B%5D mark = new int%5Bn+1%5D;%0A        mark%5B0%5D = 0;%0A        int maxLen = 0;%0A        for(int i=1; i%3C=n; i++) %7B%0A            mark%5Bi%5D = 0;%0A            if(s.charAt(i-1) == ')') %7B%0A                int j = i - 2 - mark%5Bi-1%5D;%0A                if(j %3E= 0 && s.charAt(j) == '(') %7B%0A                    mark%5Bi%5D = mark%5Bi-1%5D + mark%5Bj%5D + 2;%0A                %7D%0A            %7D%0A            maxLen = Math.max(maxLen, mark%5Bi%5D);%0A        %7D%0A        return maxLen;%0A    %7D%0A%7D%0A

Create Longest_Valid_Parentheses.java