Python solution with 45ms


  • 1
    H
    class Solution:
        # @param n, an integer
        # @return an integer
        def reverseBits(self, n):
            return int(bin(n)[2:].zfill(32)[::-1],2)

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.