message: Update reverse-bits.py
diff: -# Time : O(logn) = O(32)
  +# Time : O(32)
  # Space: O(1)
  -
  class Solution(object):
  + # @param n, an integer
  + # @return an integer
  + def reverseBits(self, n):
  + n = (n >> 16) | (n << 16)
  + n = ((n & 0xff00ff00) >> 8) | ((n & 0x00ff00ff) << 8)
  + n = ((n & 0xf0f0f0f0) >> 4) | ((n & 0x0f0f0f0f) << 4)
  + n = ((n & 0xcccccccc) >> 2) | ((n & 0x33333333) << 2)
  + n = ((n & 0xaaaaaaaa) >> 1) | ((n & 0x55555555) << 1)
  + return n
  +
  +
  +# Time : O(logn) = O(32)
  +# Space: O(1)
  +class Solution2(object):
  # @param n, an integer
  # @return an integer
  def reverseBits(self, n):
  @@ -12,11 +25,3 @@ class Solution(object):
  n >>= 1
  return result
  - def reverseBits2(self, n):
  - string = bin(n)
  - if '-' in string:
  - string = string[:3] + string[3:].zfill(32)[::-1]
  - else:
  - string = string[:2] + string[2:].zfill(32)[::-1]
  - return int(string, 2)
  -
  