摘要: 题目链接 692. 前K个高频单词 思路 还是与前k大问题一样,只不过需要注意一下字典序的问题。 代码 class Solution{ public List<String> topKFrequent(String[] words, int k){ HashMap<String, Integer> 阅读全文
posted @ 2023-01-09 09:36 Frodo1124 阅读(17) 评论(0) 推荐(0) 编辑