DSA
Bit Manipulation
README

Bit Manipulation

The number of questions on bit manipulation in coding interviews is relatively low. However, it is essential to understand the basics of bit manipulation to solve these questions. This section will cover the basics of bit manipulation and provide solutions to common bit manipulation questions.

Table of Contents

QuestionDifficultySolution
Swap Two NumbersBasicSolution
Set ith bitBasicSolution
Check if K-th bitBasicSolution
Clear the K-th bitBasicSolution
Toogle the K-th bitBasicSolution
Turn off the rightmost set bitBasicSolution