摘要:
public class Solution { public boolean isPalindrome(int x) { if (x < 0) { return false; } return x == reverse(x); ... 阅读全文
摘要:
public class Solution { public int myAtoi(String str) { if (str == null) { return 0; } int res = 0; ... 阅读全文
摘要:
注意Integer.MIN_VALUE的绝对值是比Integer.MAX_VALUE大1的public class Solution { public int reverse(int x) { int res = 0; int num = Math.abs(x); ... 阅读全文
摘要:
public class Solution { public String convert(String s, int numRows) { String res = ""; if (s.length() < numRows || numRows == 1) { ... 阅读全文