import java.util.*; public class Solution { /** * * @param s string字符串 * @return bool布尔型 */ public boolean isValid (String s) { Stack<Character> stack = new Stack<>(); char[] arr = s.toCharArray(); // stack.push(arr[0]); for...