有效的括号

This commit is contained in:
LingZhaoHui 2021-02-25 22:16:18 +08:00
parent e8c1f1b699
commit 37b4b2dcf1
1 changed files with 7 additions and 1 deletions

View File

@ -18,7 +18,13 @@ import java.util.Stack;
*/
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('[', ']');