有效的括号

This commit is contained in:
LingZhaoHui 2021-02-25 22:16:18 +08:00
parent e8c1f1b699
commit 37b4b2dcf1

View File

@ -18,7 +18,13 @@ import java.util.Stack;
*/ */
public class IsValidKuoHao { public class IsValidKuoHao {
private static Map<Character, Character> kuohao = new HashMap<Character, Character>() {{ private static Map<Character, Character> kuohao = new HashMap<Character, Character>() {
/**
*
*/
private static final long serialVersionUID = 1L;
{
put('(', ')'); put('(', ')');
put('{', '}'); put('{', '}');
put('[', ']'); put('[', ']');