## Find Multiples of 2 or 3 or 5 less than or equal to N

Given an integer . The task is to count all such numbers that are less than or equal to N which are divisible by any… Read More »

- Find i’th index character in a binary string obtained after n iterations | Set 2
- Iterative Segment Tree (Range Maximum Query with Node Update)
- Subtraction of two numbers using 2's Complement
- Find Multiples of 2 or 3 or 5 less than or equal to N
- Program to invert bits of a number Efficiently
- Bitwise OR (or | ) of a range
- Count pairs with Bitwise AND as ODD number
- Print all the combinations of N elements by changing sign such that their sum is divisible by M
- Maximum sum by adding numbers with same number of set bits
- Find the missing element in an array of integers represented in binary format
- First element greater than or equal to X in prefix sum of N numbers using Binary Lifting
- Number of integers with odd number of set bits
- Inserting M into N such that m starts at bit j and ends at bit i | Set-2
- Algorithms | Bit Algorithms | Question 1
- Check if bits in range L to R of two numbers are complement of each other or not
- Number with set bits only between L-th and R-th index
- Algorithms | Bit Algorithms | Question 2

Given an integer . The task is to count all such numbers that are less than or equal to N which are divisible by any… Read More »

Given a non-negative integer N. The task is to invert the bits of the number N and print the decimal equivalent of the number obtained… Read More »

Given N strings which represents all integers from 0 to N in binary format except any one. The task is to find the missing number.… Read More »

Given two numbers and . The task is to subtract from by using 2’s Complement method. Note: Negative numbers represented as 2’s Complement of Positive… Read More »

Given two 32-bit numbers, N and M, and two-bit positions, i and j. Write a method to insert M into N such that M starts… Read More »

Given an array of N integers and a number X. The task is to find the index of first element which is greater than or… Read More »

Given an array of N numbers, the task is to find the maximum sum that can be obtained by adding numbers with the same number… Read More »

Given an array of N integers. The task is to find the number of pairs (i, j) such that A[i] & A[j] is odd. Examples:… Read More »

Given two non-negative numbers a and b and two values l and r. The problem is to check whether all bits at corresponding positions in… Read More »

Given an array arr[0 . . . n-1]. The task is to perform the following operation: Find the maximum of elements from index l to… Read More »

Given an array of N integers and an integer M. You can change the sign(positive or negative) of any element in the array. The task… Read More »

Given a decimal number m, convert it into a binary string and apply n iterations, in each iteration 0 becomes “01” and 1 becomes “10”.… Read More »

Given two integers L and R. Determine the bitwise OR of all the integers in the range [L, R] (both inclusive). Examples: Input: L =… Read More »

Given L and R. The task is to find the number in whose binary representation all bits between the L-th and R-th index are set… Read More »

Given a number n, count number of integers smaller than or equal to n that have odd number of set bits. Examples: Input : 5… Read More »