两个面世题# Programming - 葵花宝典
a*y
1 楼
1.给你两个variable, each has one byte, multiply them, how many bytes do you
need to store the result.
2. count the number of "1" in a number. I answered use num&(num-1)来count,
他说要是worst case全是1怎么办? 我说那就count "0"是不是我说错了这个optimize的
方法?
need to store the result.
2. count the number of "1" in a number. I answered use num&(num-1)来count,
他说要是worst case全是1怎么办? 我说那就count "0"是不是我说错了这个optimize的
方法?