![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Bit
ljffdream
这个作者很懒,什么都没留下…
展开
-
【LeetCode】Single Number
【题目】 Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without u原创 2014-12-04 10:22:37 · 289 阅读 · 0 评论 -
【Leetcode】number of 1 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 representation 00000000原创 2015-04-08 09:58:32 · 351 阅读 · 0 评论 -
【Leetcode】Subsets
【题目】 Given a set of distinct integers, nums, return all possible subsets. Note: Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.转载 2015-07-12 21:17:00 · 339 阅读 · 0 评论 -
[Leetcode]Power of Two
[题目] Given an integer, write a function to determine if it is a power of two. [思路] 这道题的思路还是蛮简单的说,0的时候是false,不可能是2 的倍数。 8/2 =4 4/2 =2 2/2 =1。最后肯定是得1。 7%2 !=0不能被2整除肯定是不行的。 [代码] public class S转载 2015-07-06 21:43:07 · 643 阅读 · 0 评论