@@ -0,0 +1,928 @@
+class BraceValidator %7B%0A    int indexOf(Array ar, Char c) %7B%0A        for (int i = 0; i %3C ar.length() ; i++) %7B%0A            if (ar%5Bi%5D == c) %7B%0A                return i;%0A            %7D%0A        %7D%0A        return -1;%0A    %7D%0A    boolean isValid(String input) %7B%0A        Map braces = new Map%3Cchar, char%3E();%0A        braces.put('%7B', '%7D');%0A        braces.put('%5B', '%5D');%0A        braces.put('(', ')');%0A%0A        Stack%3Cchar%3E openers = new Stack%3Cchar%3E();%0A        char%5B%5D chars = input.toCharArray();%0A        for (Char c : chars) %7B%0A            if (braces.keySet().contains(c)) %7B%0A                openers.push(c);%0A            %7D%0A            else if (braces.values().contains(c)) %7B%0A                if (openers.isEmpty())%0A                    return false;%0A                else if (c != braces.get(openers.peek()))%0A                    return false;%0A                else%0A                    openers.pop();%0A            %7D%0A        %7D%0A        return true;%0A    %7D%0A%7D%0A

Create BraceValidator.java