為什么easy題都這么難T^T
我一開始的思路是把Integer 變成 binary bit, 用String save起來。然后再reverse的讀取。然后在convert成Integer。
首先這個convert between int, binary就很難了。然后隨便一個數,變成binary以后長度會超級長。絕望啊。?? Bit Manipulation 還是學的太差了。
result += n&1 取n的最后一個bit。
n ?>>>=1 ?right shift一位。
result <<=1 left shit 1位,因為要reverse。
我不覺得這是一個很簡單題呀。。