摘要: 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;... 阅读全文
posted @ 2018-09-26 10:29 jasoncool1 阅读(107) 评论(0) 推荐(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... 阅读全文
posted @ 2018-09-26 09:39 jasoncool1 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 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 ... 阅读全文
posted @ 2018-09-26 04:21 jasoncool1 阅读(96) 评论(0) 推荐(0) 编辑