摘要:
Palindrome Number:Determine whether an integer is a palindrome. Do this without extra space. 题意:判断一个整数是否是回文数,且不可以使用额外的空间。 思路:首先负数不是回文数,然后每次取出数的最高位和最低位,进行判断。 代码: public class Solution { public bool... 阅读全文
摘要:
Number of i Bits: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 integer “11” has binary representa... 阅读全文