上一页 1 ··· 13 14 15 16 17
摘要: 78. Subsets List<List<Integer>> res = new ArrayList<>(); public List<List<Integer>> subsets(int[] nums) { backtracking(nums, 0, new ArrayList<>()); re 阅读全文
posted @ 2021-12-31 11:31 阳光明媚的菲越 阅读(22) 评论(0) 推荐(0) 编辑
摘要: My First PriorifyQueue Solution This soltion use a Map to record the frequency of every number, and then use PriorityQueue to sort by frequency. The t 阅读全文
posted @ 2021-12-15 08:26 阳光明媚的菲越 阅读(23) 评论(0) 推荐(0) 编辑
摘要: My First BFS Solution public boolean wordBreak(String s, List<String> wordDict) { if(wordDict.contains(s)) return true; Queue<String> queue = new Link 阅读全文
posted @ 2021-12-15 07:16 阳光明媚的菲越 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 一、简单介绍Map 在讲解Map排序之前,我们先来稍微了解下map。map是键值对的集合接口,它的实现类主要包括:HashMap,TreeMap,Hashtable以及LinkedHashMap等。其中这四者的区别如下(简单介绍): HashMap:我们最常用的Map,它根据key的HashCode 阅读全文
posted @ 2017-02-21 06:52 阳光明媚的菲越 阅读(72) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17