摘要:
public class Solution { public String multiply(String num1, String num2) { int[] digits=new int[num1.length()+num2.length()]; for(int i=0;i=0;i--) { if(i>0) ... 阅读全文
摘要:
class Solution { public int trap(int[] height) { int sum=0; int l=0; int r=height.length-1; int left=0; int right=0; while(lleft) ... 阅读全文
摘要:
class Solution { public int firstMissingPositive(int[] nums) { int i=0; while(i0&&nums[i]<=nums.length&&nums[i]!=nums[nums[i]-1]) { int tmp=nums[i]; ... 阅读全文
摘要:
class Solution { public List> combinationSum2(int[] candidates, int target) { List> ret=new ArrayList>(); Arrays.sort(candidates); boolean[] used=new boolean[candidates.le... 阅读全文
摘要:
public class Solution { public List> combinationSum(int[] candidates, int target) { List> ret=new ArrayList>(); Arrays.sort(candidates); generateCombination(new ArrayList(... 阅读全文