Single Line 33ms python


  • 0
    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.