2015年5月19日
摘要: public class Solution { public int threeSumClosest(int[] nums, int target) { if (nums == null || nums.length < 3) { return Intege... 阅读全文
posted @ 2015-05-19 05:57 kikiUr 阅读(98) 评论(0) 推荐(0) 编辑
  2015年5月18日
摘要: public class Solution { public void merge(int[] nums1, int m, int[] nums2, int n) { int i = m - 1; int j = n - 1; int k = m + ... 阅读全文
posted @ 2015-05-18 14:36 kikiUr 阅读(69) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public String convertToTitle(int n) { if(n == 0) { return ""; } return convertToTitle((n - ... 阅读全文
posted @ 2015-05-18 14:35 kikiUr 阅读(94) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public ArrayList> generate(int numRows) { ArrayList> res = new ArrayList>(); if (numRows == 0) { r... 阅读全文
posted @ 2015-05-18 07:09 kikiUr 阅读(66) 评论(0) 推荐(0) 编辑
  2015年5月17日
摘要: public class Solution { public int[] plusOne(int[] digits) { int carry = 1; for (int i = digits.length -1; i >= 0; i--) { ... 阅读全文
posted @ 2015-05-17 08:42 kikiUr 阅读(98) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public int removeElement(int[] nums, int val) { if (nums == null || nums.length == 0) { return 0; ... 阅读全文
posted @ 2015-05-17 08:21 kikiUr 阅读(67) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public int removeDuplicates(int[] nums) { if (nums == null || nums.length == 0) { return 0; } ... 阅读全文
posted @ 2015-05-17 08:11 kikiUr 阅读(80) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public void rotate(int[] nums, int k) { int n = nums.length; k = k % n; int[] res = new int[n]; ... 阅读全文
posted @ 2015-05-17 07:51 kikiUr 阅读(80) 评论(0) 推荐(0) 编辑
  2015年5月13日
摘要: public class Solution { public boolean isPalindrome(int x) { if (x < 0) { return false; } return x == reverse(x); ... 阅读全文
posted @ 2015-05-13 11:35 kikiUr 阅读(65) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public int myAtoi(String str) { if (str == null) { return 0; } int res = 0; ... 阅读全文
posted @ 2015-05-13 09:08 kikiUr 阅读(85) 评论(0) 推荐(0) 编辑