190. Reverse Bits
題目原文
Reverse bits of a given 32 bits unsigned integer.
Example:
Follow up:
If this function is called many times, how would you optimize it?
解題思路
我的解法比較像是韌體工程師的想法。
當作是shift的方式移動32bit register 。
把a register lsb塞給b register b的msb。
:)
程式解答
Last updated
Was this helpful?