本文共 408 字,大约阅读时间需要 1 分钟。
问题原文
public boolean wordPattern(String pattern, String str) { if(pattern == null && str == null) return true; if(pattern == null || str == null) return false; //用数字记录下模式 int[] Ptable = new int[26];//a is 97 StringBuilder l1 = new StringBuilder(); for(int i = 0;imap = new HashMap<>(); StringBuilder tmp = new StringBuilder(); int current = 0; while(current
转载地址:http://ptgdb.baihongyu.com/