## Decimal representation of given binary string is divisible by 20 or not

The problem is to check whether the decimal representation of the given binary number is divisible by 20 or not. Take care, the number could… Read More »

The problem is to check whether the decimal representation of the given binary number is divisible by 20 or not. Take care, the number could… Read More »

Given two integer numbers, whenever the bits of the first number is set i.e. 1, toggle the bits of the second number leaving the rest… Read More »

Given a positive integer n. The problem is to print numbers in the range 1 to n having first and last bits as the only… Read More »

Given a number, the task is to toggle bits of a number expect first and last bit. Examples: Input : 10 Output : 14 Binary… Read More »

Given four positive integers, determine if there’s a rectangle such that the lengths of its sides are a, b, c and d (in any order).… Read More »

Given a number, the task is to Toggle all even bit of a number Examples: Input : 10 Output : 0 binary representation 1 0… Read More »

Given a number n, the task is to toggle only first and last bits of a number Examples: Input : 10 Output : 3 Binary… Read More »

Given a non-negative integer n. The problem is to check if binary representation of n is palindrome or not. Note that the actual binary representation… Read More »

Given a non-negative integer n. The problem is to reverse the bits of n and print the number obtained after reversing the bits. Note that… Read More »

Odious number is a nonnegative number that has an odd number of 1s in its binary expansion. The first few odious numbers are therefore 1,… Read More »

Given an integer, set the leftmost unset bit. Leftmost unset bit is the first unset bit after most significant set bit. If all bits (after… Read More »

A pernicious number is a positive integer which has prime number of ones in its binary representation. The first pernicious number is 3 since 3… Read More »

Given an positive integer n and k. Find maximum xor of 1 to n using at most k numbers. Xor sum of 1 to n… Read More »

Given a non-negative number n and two values l and r. The problem is to count the number of set bits in the range l… Read More »

Given a non-negative integer n. The problem is to increment n by 1 by manipulating the bits of n. Examples: Input : 6 Output :… Read More »