Check if a Number is Even or Odd

Medium
50 views 22 Dec 2025
Determine whether a given integer is even or odd using bitwise operators instead of arithmetic operators....

Find the Only Non-Repeating Element

Medium
25 views 22 Dec 2025
Given an array where every element appears twice except one find that unique element using XOR....

Count Set Bits

Medium
21 views 22 Dec 2025
Count the number of set bits (1s) in the binary representation of a number....

Check Power of Two

Medium
18 views 22 Dec 2025
Check whether a given number is a power of two using bitwise operations....

Swap Two Numbers Without Temp

Medium
19 views 22 Dec 2025
Swap two numbers without using a temporary variable using XOR operation....

Find Rightmost Set Bit

Medium
22 views 22 Dec 2025
Find the position of the rightmost set bit in a number....

Turn Off Rightmost Set Bit

Medium
21 views 22 Dec 2025
Turn off the rightmost set bit of a given number....

Set the ith Bit

Medium
19 views 22 Dec 2025
Set the ith bit of a given number using bitwise operators....

Clear the ith Bit

Medium
21 views 22 Dec 2025
Clear the ith bit of a given number....

Toggle the ith Bit

Medium
23 views 22 Dec 2025
Toggle the ith bit of a number using XOR....

Check ith Bit is Set

Medium
21 views 22 Dec 2025
Check whether the ith bit of a number is set or not....

Multiply by Two Using Bits

Medium
16 views 22 Dec 2025
Multiply a number by two using left shift operation....

Divide by Two Using Bits

Medium
17 views 22 Dec 2025
Divide a number by two using right shift operation....

Find Missing Number

Medium
23 views 22 Dec 2025
Find the missing number in an array containing numbers from 1 to N using XOR....

Single Number II

Medium
16 views 22 Dec 2025
Find the element that appears once when others appear three times....

Add Two Numbers Without Plus

Medium
15 views 22 Dec 2025
Add two integers without using the + operator....

Reverse Bits

Medium
17 views 22 Dec 2025
Reverse the bits of a given 32-bit unsigned integer....

Check Opposite Signs

Medium
15 views 22 Dec 2025
Check whether two integers have opposite signs using bit manipulation....

Bitwise AND of Range

Medium
18 views 22 Dec 2025
Compute bitwise AND of all numbers in a given range [L, R]....

Gray Code Generation

Medium
20 views 22 Dec 2025
Generate the sequence of Gray codes for n bits using bit manipulation....