摘要:
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 阅读全文
摘要:
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: 阅读全文
摘要:
Given an integer, write a function to determine if it is a power of two. 题目标签:Math; Bit Manipulation 题目给了我们一个int n,让我们判断n 是不是 2的次方数。 这一题不难,但是这里有一个比较巧妙 阅读全文
摘要:
Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. 题目标签:Math 题目要求我们找到末尾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: 题目 阅读全文
摘要:
Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 题目标签:Math 题目给了我们一个 int n, 让我们返回对应的 excel 表格 阅读全文
摘要:
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 阅读全文
摘要:
Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 题目标签:Math 题目给了我们两个string a 和 b,让我们把这两个二进制 阅读全文
摘要:
Determine whether an integer is a palindrome. Do this without extra space. 题目标签:Math 题目给了我们一个int x, 让我们判断它是不是回文数字。 首先,负数就不是回文数字,因为有个负号。 剩下的都是正数,只要把数字 阅读全文
摘要:
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 阅读全文