![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hashmap
ZoJane
生不带来,死不带走。
展开
-
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(...原创 2019-04-03 22:59:58 · 327 阅读 · 0 评论 -
leetcode451. 根据字符出现频率排序(JAVA)(hashmap)
my solution:class Solution { public String frequencySort(String s) { Map<Character,Integer> map=new HashMap<>(); List<Character> ret=new ArrayList<C...原创 2019-04-05 20:05:46 · 574 阅读 · 0 评论