@@ -0,0 +1,1009 @@
+public class Solution %7B%0A    /**%0A     * @param s A string%0A     * @return whether the string is a valid parentheses%0A     */%0A    public boolean isValidParentheses(String s) %7B%0A        // Write your code here%0A        Stack%3CString%3E stack = new Stack%3CString%3E();%0A        HashMap%3CString, String%3E map = new HashMap%3CString, String%3E();%0A        map.put(%22)%22, %22(%22);%0A        map.put(%22%5D%22, %22%5B%22);%0A        map.put(%22%7D%22, %22%7B%22);%0A        %0A        for (int i = 0; i %3C s.length(); i++) %7B%0A            String symbol = s.substring(i, i + 1);%0A            if (!symbol.equals(%22(%22) && !symbol.equals(%22%5B%22) && !symbol.equals(%22%7B%22)) %7B%0A                if (stack.empty()) %7B%0A                    return false;%0A                %7D%0A                String last = stack.pop();%0A                if (!map.get(symbol).equals(last)) %7B%0A                    return false;%0A                %7D%0A            %7D else %7B%0A                stack.push(symbol);%0A            %7D%0A        %7D%0A        if (!stack.empty()) %7B%0A            return false;%0A        %7D%0A        return true;%0A    %7D%0A%7D

Create ValidParentheses for LintCode