摘要: 水题。但题下的注释还是有点启发的,一个是比如120反转,一个是反转后有可能int溢出。前者不需要特殊处理,后者需要clarify,如果发生是否以另一个参数传出或抛出异常。public class Solution { public int reverse(int x) { // Start typing your Java solution below // DO NOT write main() function int result = 0; boolean neg = false; if (x < 0) { ... 阅读全文
posted @ 2013-07-18 16:36 阿牧遥 阅读(211) 评论(0) 推荐(0)