Reverse Bits

Reverse bits of a given 32 bits unsigned integer. Example Input 43261596  (00000010100101000001111010011100) Output 964176192 (00111001011110000010100101000000) A 32-bit unsigned integer refers to a nonnegative number which can be represented with a string of 32 characters where each character can be either ‘0’ or ‘1’. Algorithm for i in range 0 …

Read more

Translate »