摘要:
class Solution { public List> threeSum(int[] nums) { List> ret=new ArrayList>(); Arrays.sort(nums); for(int i=0;i0) r--; else ... 阅读全文
posted @ 2017-09-22 12:32
Weiyu Wang
阅读(110)
评论(0)
推荐(0)
摘要:
class Solution { public String intToRoman(int num) { String[][] r=new String[][]{{"","M","MM","MMM"}, {"","C","CC","CCC","CD","D","DC","DCC","DCCC","CM"}, ... 阅读全文
posted @ 2017-09-22 12:12
Weiyu Wang
阅读(122)
评论(0)
推荐(0)
摘要:
class Solution { public int maxArea(int[] height) { int maxArea=0; int i=0; int j=height.length-1; while(i<j) { maxArea=Math.max(maxArea,Math.m... 阅读全文
posted @ 2017-09-22 11:23
Weiyu Wang
阅读(137)
评论(0)
推荐(0)
摘要:
Recursive DP 阅读全文
posted @ 2017-09-22 04:31
Weiyu Wang
阅读(168)
评论(0)
推荐(0)
摘要:
class Solution { public int myAtoi(String str) { str=str.trim(); if(str.length()==0) return 0; int flag=1; int i=0; if(str.charAt(i)=='+') ... 阅读全文
posted @ 2017-09-22 02:18
Weiyu Wang
阅读(131)
评论(0)
推荐(0)
摘要:
class Solution { public String convert(String s, int numRows) { if(numRows==1) return s; int divisor=(numRows-1)*2; StringBuilder sb=new StringBuilder(); ... 阅读全文
posted @ 2017-09-22 01:53
Weiyu Wang
阅读(88)
评论(0)
推荐(0)

浙公网安备 33010602011771号