摘要: Note: MANY DETAILS ARE MISSED: 1. If less than 3, return as many as it. So it could be NPE when queue.poll().getKey() 2. Use alphabetical order if tim 阅读全文
posted @ 2017-09-07 16:05 keepshuatishuati 阅读(818) 评论(0) 推荐(0) 编辑
摘要: Note: 1. Need check whether the node is the last node or not. 2. Need add a counter for counting how many branches it has. UnionFind 阅读全文
posted @ 2017-09-07 14:49 keepshuatishuati 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Note: Need to skipp the 0 element update room but cannot skip BFS from that point 阅读全文
posted @ 2017-09-07 13:49 keepshuatishuati 阅读(115) 评论(0) 推荐(0) 编辑
摘要: class Solution { public int[][] multiply(int[][] A, int[][] B) { if (A.length == 0 || A[0].length == 0 || B.length == 0 || B[0].length == 0 || A[0].length != B.length) { retur... 阅读全文
posted @ 2017-09-07 13:25 keepshuatishuati 阅读(165) 评论(0) 推荐(0) 编辑