2015年6月5日
posted @ 2015-06-05 15:46
kikiUr
阅读(80)
推荐(0)
2015年6月2日
摘要:
public class Solution { public int lengthOfLongestSubstring(String s) { if (s == null || s.length() == 0) { return 0; } ...
阅读全文
posted @ 2015-06-02 05:21
kikiUr
阅读(101)
推荐(0)
2015年5月30日
摘要:
public class Solution { public boolean containsDuplicate(int[] nums) { HashSet hs = new HashSet(); for (int i : nums) { ...
阅读全文
posted @ 2015-05-30 08:16
kikiUr
阅读(117)
推荐(0)
摘要:
public List> combinationSum3(int k, int n) { List> res = new ArrayList>(); List item = new ArrayList(); int sum[] = {0}; ...
阅读全文
posted @ 2015-05-30 08:15
kikiUr
阅读(115)
推荐(0)
摘要:
public class Solution { public int minSubArrayLen(int s, int[] nums) { if (nums == null || nums.length == 0) { return 0; }...
阅读全文
posted @ 2015-05-30 08:13
kikiUr
阅读(133)
推荐(0)
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
阅读(166)
推荐(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
阅读(156)
推荐(0)
摘要:
public class Solution { public int maximalRectangle(char[][] matrix) { if (matrix == null || matrix.length == 0) { return 0; ...
阅读全文
posted @ 2015-05-29 09:30
kikiUr
阅读(146)
推荐(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
阅读(178)
推荐(0)
摘要:
public class Solution { public ArrayList getRow(int rowIndex) { ArrayList res = new ArrayList(); if (rowIndex = 0; j--) { ...
阅读全文
posted @ 2015-05-29 07:16
kikiUr
阅读(107)
推荐(0)