摘要:
public class Solution { public int maxProduct(int[] A) { if (A == null || A.length == 0) { return 0; } if (A.length ... 阅读全文
摘要:
public class Solution { public int longestConsecutive(int[] nums) { HashMap hs = new HashMap(); for (int i : nums) { hs.pu... 阅读全文
摘要:
public class Solution { public int maximalRectangle(char[][] matrix) { if (matrix == null || matrix.length == 0) { return 0; ... 阅读全文
摘要:
参考 :http://www.cnblogs.com/lichen782/p/leetcode_Largest_Rectangle_in_Histogram.html public int largestRectangleArea(int[] height) { int i =... 阅读全文
摘要:
public class Solution { public ArrayList getRow(int rowIndex) { ArrayList res = new ArrayList(); if (rowIndex = 0; j--) { ... 阅读全文