public class Solution { // 2、哈希 public int FirstNotRepeatingChar(String str) { HashMap<Character, Boolean> map = new HashMap<>(); char[] chars = str.toCharArray(); for(char c : chars) { if(map.containsKey(c)) { map.put(c, false); // 重复 置为false }else { map.put(c, true); // 第一次出现 } } for (...