摘要: coin循环要在外面 从小到大 不会有重复 阅读全文
posted @ 2018-10-29 13:14 jasoncool1 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Serialize 用BFS 中间空格分开Deserialize 用一个queue存起来new的TreeNode 下次调用它进行构造 阅读全文
posted @ 2018-10-29 12:21 jasoncool1 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution { 2 public boolean backspaceCompare(String S, String T) { 3 if(S.length() == 0 || T.length() == 0){ 4 return S.equals(T); 5 } 6 StringBu... 阅读全文
posted @ 2018-10-29 10:23 jasoncool1 阅读(123) 评论(0) 推荐(0) 编辑
摘要: sliding window 阅读全文
posted @ 2018-10-29 09:58 jasoncool1 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution { 2 public boolean validUtf8(int[] data) { 3 if(data.length == 0) return false; 4 int start = 0; 5 while(start = data.length || helper(data[start+1])... 阅读全文
posted @ 2018-10-29 09:24 jasoncool1 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 很像图的问题 实际上只用考虑indegree 当indegree等于0的时候 就可以被放进queue 进行bfs 最后能放进n个course就可以返回 阅读全文
posted @ 2018-10-29 06:44 jasoncool1 阅读(90) 评论(0) 推荐(0) 编辑