public boolean isValid(String s) {
		if (s == null || s.length() <= 1) {
			return false;
		}
		
		Map<Character, Character> map = new HashMap<Character, Character>();
		map.put('(', ')');
		map.put('[', ']');
		map.put('{', '}');
		
		Stack<Character> stack = new Stack<Character>();
		
		for (char c : s.toCharArray()) {
			if (map.keySet().contains(c)) {
				stack.push(c);
			} else if (map.values().contains(c) && !stack.isEmpty() && map.get(stack.peek()).equals(c)) {
				stack.pop();
			} else {
				return false;
			}
		}
		
		return stack.isEmpty();
	}