摘要: Given an integer, write a function to determine if it is a power of three. Follow up:Could you do it without using any loop / recursion? 阅读全文
posted @ 2016-12-29 01:19 北叶青藤 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Determine whether an integer is a palindrome. Do this without extra space. 分析:把一个数倒过来,然后看两个数是否相同。 Reverse digits of an integer. Example1: x = 123, ret 阅读全文
posted @ 2016-12-29 00:15 北叶青藤 阅读(225) 评论(0) 推荐(0) 编辑