Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 423 Bytes

File metadata and controls

17 lines (12 loc) · 423 Bytes

Problem 5: Reverse Bits

Problem Statement

Reverse the bits of a given 32-bit unsigned integer.

Input Format

  • An integer n (32-bit unsigned).

Output Format

  • An integer — the result of reversing the bits.

Constraints

  • Input is a 32-bit unsigned integer.

Example

Input: n = 43261596 (binary: 00000010100101000001111010011100)
Output: 964176192 (binary: 00111001011110000010100101000000)