Reverse Bits of Integer Problem

Reverse Bits of Integer Problem — ExecCode Easy DSA Practice

Solve the Reverse Bits of Integer problem on ExecCode. Free online easy DSA practice in Bit Manipulation. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Description You are given the input needed to solve Reverse Bits of Integer. Your task is to reverse bits of a given 32 bits signed integer. Return the required answer exactly as shown in the examples.

Examples

Input {"n": 1}; Output 2147483648. Input {"n": 2}; Output 1073741824

Constraints

0 <= n <= 2^31 - 2 n is even.

Practice Reverse Bits of Integer free on ExecCode. Browse DSA problems, topic map, and placement guides.