摘要:
1 class Solution { 2 public String longestCommonPrefix(String[] strs) { 3 if(strs.length == 0) return ""; 4 StringBuilder sb = new StringBuilder(""); 5 for(int i = 0;... 阅读全文
摘要:
1 class Solution { 2 public boolean isPalindrome(int x) { 3 if(x < 0) return false; 4 String str = "" + x; 5 StringBuilder sb = new StringBuilder(str); 6 return sb... 阅读全文
摘要:
1 class Solution { 2 public int reverse(int x) { 3 long x2 = (long)x; 4 if(x == 0) return 0; 5 if(x2 Integer.MAX_VALUE) { 22 return 0; 23 ... 阅读全文