Skip to content

Category Archives: Bit Magic

Given a binary string S, the task is to find that the decimal representation of the given binary string is divisible by integer K or… Read More
Given two binary strings s1[] and s2[] of the same length N, the task is to find the minimum number of operations to make them… Read More
Given two positive integers N and K, the task is to find the number of arrays of size N such that each array element lies… Read More
Given an array arr[] consisting of N positive integers and a positive integer X, the task is to find the number of pairs (i, j)… Read More
Given a positive integer N, the task is to print the minimum count of consecutive numbers less than N such that the bitwise AND of… Read More
Given an integer N, the task is to print the count of all the non-negative integers K less than or equal to N, such that… Read More
Given a sorted array arr[] of the first N Natural Numbers and an integer X, the task is to print the last remaining element after… Read More
Given a positive integer N, the task is to count the number of N-digit numbers such that the bitwise AND of adjacent digits equals 0.… Read More
There are many ways of classifying algorithms and a few of them are shown below: Implementation Method Design Method Other Classifications Classification by Implementation Method:Attention… Read More
Given two binary strings L and R, the task is to find the xor from L to R. Length of the binary string is <… Read More
Given two binary strings S and T of length N and a positive integer K. Initially, all characters of T are ‘0’. The task is… Read More
Given a positive integer N, the task is to count the number of N-digit numbers such that every digit from [0-9] occurs at least once.… Read More
Given two integers L and R. The task is to find the count of all numbers in the range [L, R] whose Least Significant Bit… Read More
Given two arrays arr[] of size N and queries[] of size Q, the task is to find the OR of AND of subsets of the… Read More
Given an integer N, the task is to find the smallest number K such that bitwise AND of all the numbers in range [N, N-K]… Read More

Start Your Coding Journey Now!