12 2021 档案
BackTracking Classes Questions 大合集
摘要: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 阳光明媚的菲越 阅读(34) 评论(0) 推荐(0)
347. Top K Frequent Elements
摘要: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 阳光明媚的菲越 阅读(38) 评论(0) 推荐(0)
139. Word Break
摘要: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 阳光明媚的菲越 阅读(33) 评论(0) 推荐(0)