leetcode1002查找常用字符(Java)(hashmap)

class Solution { public List<String> commonChars(String[] A) { Map<Character,Integer> map=new HashMap<>(); for(char c:A[0].toCharArray()){ map.put(c,map.getOrDefault(c,
相關文章
相關標籤/搜索