上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页
摘要: 待补充。 阅读全文
posted @ 2015-11-11 21:14 AprilCheny 阅读(349) 评论(0) 推荐(0) 编辑
摘要: Implementint sqrt(int x).Compute and return the square root ofx.Subscribeto see which companies asked this question解法1:使用求正数的平方根的一般二分查找法:class Solutio... 阅读全文
posted @ 2015-11-11 21:11 AprilCheny 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Implement a basic calculator to evaluate a simple expression string.The expression string may contain open(and closing parentheses), the plus+or minus... 阅读全文
posted @ 2015-11-11 10:44 AprilCheny 阅读(380) 评论(0) 推荐(0) 编辑
摘要: Given an array containingndistinct numbers taken from0, 1, 2, ..., n, find the one that is missing from the array.For example,Givennums=[0, 1, 3]retur... 阅读全文
posted @ 2015-11-10 09:16 AprilCheny 阅读(261) 评论(0) 推荐(0) 编辑
摘要: Write a program to find then-th ugly number.Ugly numbers are positive numbers whose prime factors only include2, 3, 5. For example,1, 2, 3, 4, 5, 6, 8... 阅读全文
posted @ 2015-11-09 16:55 AprilCheny 阅读(3251) 评论(0) 推荐(0) 编辑
摘要: Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about this?Here are som... 阅读全文
posted @ 2015-11-09 14:52 AprilCheny 阅读(275) 评论(0) 推荐(0) 编辑
摘要: Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i... 阅读全文
posted @ 2015-11-09 13:32 AprilCheny 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.For example:Given n = 13,Return 6... 阅读全文
posted @ 2015-11-09 10:52 AprilCheny 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.Credits:Special thanks to@tsf... 阅读全文
posted @ 2015-11-09 09:23 AprilCheny 阅读(217) 评论(0) 推荐(0) 编辑
摘要: Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include2, 3, 5. For examp... 阅读全文
posted @ 2015-11-08 09:26 AprilCheny 阅读(141) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页