Check If Kth Bit Is Set/Unset
In this lesson, we try to find a bit in the binary representation of a number at the kth position and check if it is set/un-set. We have already done this, but here we will go over it with the right shift.
We'll cover the following...
Introduction
In this question, input a number and check if the bit is set or not.
Problem statement
Given two positive integers n and k check ...
Access this course and 1400+ top-rated courses and projects.