摘要: 判断回文整数 来源 "https://leetcode.com/problems/palindrome number/" 要求 判断一个整数是不是回文数,尽量减少内存暂用。 思路 可能的情况: 负数的应当作非回文数 是回文数 判断时可能会溢出 从 的数开始判断,先计算出整数有多少位,这其中要处理出现 阅读全文
posted @ 2016-06-02 21:28 NobodyZhou 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 翻转整数 来源 "https://leetcode.com/problems/reverse integer/" 要求 把一个整数倒序输出。例如: Example1: x = 123, return 321 Example2: x = 123, return 321 思路 假设 1. 不考虑溢出的情 阅读全文
posted @ 2016-06-02 16:58 NobodyZhou 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 练习问题来源 "https://leetcode.com/problems/two sum/" "https://wizardforcel.gitbooks.io/the art of programming by july/content/02.02.html" 要求 输入一个数组和一个数字,在数 阅读全文
posted @ 2016-06-02 11:48 NobodyZhou 阅读(143) 评论(0) 推荐(0) 编辑