摘要: 用Trie, dp会TLE 阅读全文
posted @ 2018-10-22 13:36 jasoncool1 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution { 2 public List findAnagrams(String s, String p) { 3 List res = new ArrayList(); 4 if(s.length() == 0 || s.length() 0 ) count--; 15 end++; 16... 阅读全文
posted @ 2018-10-22 11:39 jasoncool1 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 用Dequeue 阅读全文
posted @ 2018-10-22 06:00 jasoncool1 阅读(109) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/minimum-window-substring/discuss/26808/Here-is-a-10-line-template-that-can-solve-most-'substring'-problems 阅读全文
posted @ 2018-10-22 04:49 jasoncool1 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution { 2 public boolean validPalindrome(String s) { 3 if(s.length() == 0) return true; 4 int i = 0, j = s.length() - 1; 5 while(i < j){ 6 if(... 阅读全文
posted @ 2018-10-22 03:48 jasoncool1 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 记录前面的sum https://leetcode.com/problems/subarray-sum-equals-k/discuss/102106/Java-Solution-PreSum-+-HashMap 阅读全文
posted @ 2018-10-22 03:04 jasoncool1 阅读(118) 评论(0) 推荐(0) 编辑