1957

无聊蛋疼的1957写的低端博客
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年8月23日

摘要: 判断一个数字是否是回文,但是不能使用额外的空间- -!不知道我定义一个div变量算不算额外空间-,-class Solution {public: bool isPalindrome(int x) { // Start typing your C/C++ solution below // DO NOT write int main() function if(x = 10) div = div * 10; while(x){ if(x / div != x % 10) return false; ... 阅读全文

posted @ 2013-08-23 10:18 1957 阅读(465) 评论(0) 推荐(0)