摘要:
这道题虽然不用到helper,但是却是那一路的参考code 包括有helper的http://blog.csdn.net/linhuanmars/article/details/24286377public class Solution { public ArrayList> subsets(... 阅读全文
摘要:
三个指针,就是比较容易糊涂,要想清楚public class Solution { public void sortColors(int[] A) { if(A==null || A.length0 && A[p2]==2){ p2--; } ... 阅读全文
摘要:
这道题有两种解法,第一种最好想吧,2次两分法,第二种是维度变换详细解释refhttp://www.cnblogs.com/springfor/p/3857959.htmlpublic class Solution { public boolean searchMatrix(int[][] ma... 阅读全文
摘要:
和感染列岛那道题有点共鸣http://www.cnblogs.com/jiajiaxingxing/p/4405731.html这道题就是细节比较多吧code ganker 的总结http://blog.csdn.net/linhuanmars/article/details/39248597pub... 阅读全文
摘要:
public class Solution { public String multiply(String num1, String num2) { if(num1==null || num2==null || num1.length()*num2.length()==0) re... 阅读全文
摘要:
都还好吧,就是细节要想清楚,简单public class Solution { public String addBinary(String a, String b) { if(a==null) return b; if(b==null) return a; ... 阅读全文
摘要:
总结数据处理帖子http://blog.csdn.net/linhuanmars/article/details/39046243这道题看似简单,但是有个优化必须要考虑到,就是如果没有进位,则应该立即返回public class Solution { public int[] plusOne(... 阅读全文
摘要:
主要是细节和把握一位数组的能力public class Solution { public int minPathSum(int[][] grid) { if(grid==null || grid.length==0 || grid[0].length==0) return 0;... 阅读全文
摘要:
public class Solution { public int uniquePathsWithObstacles(int[][] obstacleGrid) { if(obstacleGrid == null || obstacleGrid.length==0 || ob... 阅读全文
摘要:
A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ... 阅读全文