Bit Manipulation Topic Wise Problem-Solving Questions
1. Basic Bit Operations
| S.No | Problem Statement | Difficulty | LeetCode | GeeksforGeeks |
|---|---|---|---|---|
| 1 | Check if a number is even or odd using bitwise operator | Easy | - | Link |
| 2 | Detect if two integers have opposite signs | Easy | - | Link |
| 3 | Swap two numbers without using temporary variable | Easy | - | Link |
| 4 | Find the number of bits to be flipped to convert A to B | Easy | - | Link |
| 5 | Count set bits in an integer | Easy | Link | Link |
2. Bit Tricks
| S.No | Problem Statement | Difficulty | LeetCode | GeeksforGeeks |
|---|---|---|---|---|
| 1 | Find the element that appears once in an array where every other element appears twice | Easy | Link | Link |
| 2 | Find the two numbers with odd occurrences in an unsorted array | Medium | Link | Link |
| 3 | Swap all odd and even bits | Medium | Link | Link |
| 4 | Turn off the rightmost set bit | Easy | - | Link |
| 5 | Find position of the only set bit | Medium | - | Link |
3. Bitmasking
| S.No | Problem Statement | Difficulty | LeetCode | GeeksforGeeks |
|---|---|---|---|---|
| 1 | Subsets (Power Set) | Medium | Link | Link |
| 2 | Maximum Product of Word Lengths | Hard | Link | - |
| 3 | Number of Valid Words for Each Puzzle | Hard | Link | - |
| 4 | Count Number of Maximum Bitwise-OR Subsets | Medium | Link | - |
4. Advanced Bit Manipulation
| S.No | Problem Statement | Difficulty | LeetCode | GeeksforGeeks |
|---|---|---|---|---|
| 1 | Divide two integers without using multiplication, division and mod operator | Hard | Link | Link |
| 2 | Find XOR of numbers from the range [L, R] | Hard | Link | Link |
| 3 | Find the maximum subset XOR of a given set | Hard | Link | Link |
| 4 | Calculate square of a number without using *, / and pow() | Hard | - | Link |
Related Bit Manipulation Resources