← All problemsSign in

Is the i-th bit set

You are given two integers, $n$ and $i$. Your task is to determine whether the **$i^{th}$ bit** (0-indexed from the least significant bit) in the **binary form of n** is $1$. Return $true$ if the bit is set, otherwise return $false$. ## Function Declaration ### Function Name $\text{isBitSet}$ – This function checks whether the $i^{th}$ bit (0-indexed from the least significant bit) in the binar

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start