String to Integer (atoi)
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 and ask you...
分类:
编程语言 时间:
2015-06-07 06:15:52
阅读次数:
181
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit i...
分类:
编程语言 时间:
2015-06-06 23:17:35
阅读次数:
152
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return...
分类:
编程语言 时间:
2015-06-06 22:08:26
阅读次数:
135
Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases.Notes:It is intended for this problem to be specified ...
分类:
其他好文 时间:
2015-06-06 21:54:58
阅读次数:
117
Reverse BitsReverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as000000101001010000011110100111...
分类:
编程语言 时间:
2015-06-06 19:26:04
阅读次数:
170
Number of 1 BitsWrite a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For exampl...
分类:
编程语言 时间:
2015-06-06 19:25:15
阅读次数:
192
一:Minimum Size Subarray Sum
题目:
Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, return
0 instead.
...
分类:
其他好文 时间:
2015-06-06 16:37:38
阅读次数:
354
1 题目:Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below...
分类:
其他好文 时间:
2015-06-06 16:18:52
阅读次数:
89
题目:Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes?...
分类:
其他好文 时间:
2015-06-06 10:27:42
阅读次数:
102
Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.解题思路:计算n能达到的5的最大次幂,算出在这种情况...
分类:
编程语言 时间:
2015-06-06 07:56:09
阅读次数:
203