BM318Maximum Product of Word Lengths

思路1 Brute Force Use brute force two check every pairs. Has TLE problem 思路2 Bit I want to use Bit, but bit of a and bit of bb always have common 1s wi...

2016-11-23 13:00:47

阅读数:158

评论数:0

BM371SumOfTwoIntegers

Negative bits shouldn't be influenced by bits manipulation

2016-11-10 12:45:41

阅读数:174

评论数:0

BM136SingleNumber

今天编程用了两个之前知道但没实践过的思路。 [ ] 把一个array头尾相接,两个pointer循环,排除数值相同的pairs直到找到single one 头尾相接,如果不用单向链而是修正两个pointers之间的差距,真的很麻烦。能用数据结构的还是先用数据结构吧

2016-10-08 11:04:19

阅读数:114

评论数:0

BM190ReverseBits

思路 Use char array 注意 If you change the variable on it’s own in the if logic, remember to use else if or it may deal with the changed result rather th...

2016-09-24 23:06:41

阅读数:64

评论数:0

BM CC150 Ch5 BM53

之前的错误思路 之后的正确思路

2016-09-23 11:56:00

阅读数:153

评论数:0

BM191NumberOf1Bits

Pre-defined Methods Integer.toBinaryString(int n) return binary string Integer.toBinaryString(int n).toCharArray() directly to array. 思路 知道可以用位运算,但是...

2016-09-17 05:02:44

阅读数:96

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭