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) 编辑
摘要: 注意Integer.MIN_VALUE的绝对值是比Integer.MAX_VALUE大1的public class Solution { public int reverse(int x) { int res = 0; int num = Math.abs(x); ... 阅读全文
posted @ 2015-05-13 05:53 kikiUr 阅读(114) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public String convert(String s, int numRows) { String res = ""; if (s.length() < numRows || numRows == 1) { ... 阅读全文
posted @ 2015-05-13 05:31 kikiUr 阅读(74) 评论(0) 推荐(0) 编辑