上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 27 下一页
摘要: Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For exa 阅读全文
posted @ 2018-02-02 05:56 Jimmy_Cheng 阅读(155) 评论(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 @ 2018-01-31 08:40 Jimmy_Cheng 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Given an integer, write a function to determine if it is a power of two. 题目标签:Math; Bit Manipulation 题目给了我们一个int n,让我们判断n 是不是 2的次方数。 这一题不难,但是这里有一个比较巧妙 阅读全文
posted @ 2018-01-25 08:25 Jimmy_Cheng 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. 题目标签:Math 题目要求我们找到末尾0的数量 阅读全文
posted @ 2018-01-17 13:00 Jimmy_Cheng 阅读(170) 评论(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 @ 2018-01-09 10:30 Jimmy_Cheng 阅读(253) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 题目标签:Math 题目给了我们一个 int n, 让我们返回对应的 excel 表格 阅读全文
posted @ 2017-12-14 09:08 Jimmy_Cheng 阅读(421) 评论(0) 推荐(0) 编辑
摘要: Implement int sqrt(int x). Compute and return the square root of x. x is guaranteed to be a non-negative integer. Example 1: Input: 4 Output: 2 Exampl 阅读全文
posted @ 2017-12-14 03:05 Jimmy_Cheng 阅读(251) 评论(0) 推荐(0) 编辑
摘要: Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 题目标签:Math 题目给了我们两个string a 和 b,让我们把这两个二进制 阅读全文
posted @ 2017-12-12 11:56 Jimmy_Cheng 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Determine whether an integer is a palindrome. Do this without extra space. 题目标签:Math 题目给了我们一个int x, 让我们判断它是不是回文数字。 首先,负数就不是回文数字,因为有个负号。 剩下的都是正数,只要把数字 阅读全文
posted @ 2017-12-12 08:40 Jimmy_Cheng 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below 阅读全文
posted @ 2017-12-10 06:46 Jimmy_Cheng 阅读(213) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 27 下一页