2015年5月29日
摘要: public class Solution { public int maxProduct(int[] A) { if (A == null || A.length == 0) { return 0; } if (A.length ... 阅读全文
posted @ 2015-05-29 14:41 kikiUr 阅读(163) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public int longestConsecutive(int[] nums) { HashMap hs = new HashMap(); for (int i : nums) { hs.pu... 阅读全文
posted @ 2015-05-29 09:55 kikiUr 阅读(152) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public int maximalRectangle(char[][] matrix) { if (matrix == null || matrix.length == 0) { return 0; ... 阅读全文
posted @ 2015-05-29 09:30 kikiUr 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 参考 :http://www.cnblogs.com/lichen782/p/leetcode_Largest_Rectangle_in_Histogram.html public int largestRectangleArea(int[] height) { int i =... 阅读全文
posted @ 2015-05-29 08:49 kikiUr 阅读(174) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public ArrayList getRow(int rowIndex) { ArrayList res = new ArrayList(); if (rowIndex = 0; j--) { ... 阅读全文
posted @ 2015-05-29 07:16 kikiUr 阅读(102) 评论(0) 推荐(0) 编辑