上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 48 下一页
摘要: Given a positive integer num, write a function which returns True if num is a perfect square else False. 题目含义:判断一个数能否被开方 阅读全文
posted @ 2017-10-20 20:39 daniel456 阅读(82) 评论(0) 推荐(0) 编辑
摘要: Given an integer, write a function to determine if it is a power of three. 题目含义:给定一个数,判断它是否是3的n次方 思路:使用换底公式 阅读全文
posted @ 2017-10-20 20:36 daniel456 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 阅读全文
posted @ 2017-10-20 20:31 daniel456 阅读(90) 评论(0) 推荐(0) 编辑
摘要: Given an integer, write a function to determine if it is a power of two. 题目含义:判断一个数是否是2的n次方 阅读全文
posted @ 2017-10-20 20:28 daniel456 阅读(119) 评论(0) 推荐(0) 编辑
摘要: ount the number of prime numbers less than a non-negative number, n. 题目含义:要求计算小于N的所有素数的个数。素数又称质数,是只能被1和自身整数的数 思路:厄拉多塞筛法 西元前250年,希腊数学家厄拉多塞(Eeatosthese) 阅读全文
posted @ 2017-10-20 20:25 daniel456 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive intege 阅读全文
posted @ 2017-10-20 20:14 daniel456 阅读(162) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. 题目含义:这里我们要求n!末尾有多少个0 思路: 阅读全文
posted @ 2017-10-20 19:49 daniel456 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 阅读全文
posted @ 2017-10-20 19:45 daniel456 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 阅读全文
posted @ 2017-10-20 19:43 daniel456 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Implement int sqrt(int x). Compute and return the square root of x. 题目题目:返回一个int数开方后的结果 阅读全文
posted @ 2017-10-20 19:40 daniel456 阅读(109) 评论(0) 推荐(0) 编辑
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 48 下一页