Bit Manipulation

34 problems to practice.

34 Total
29 Easy
4 Medium
1 Hard

Gray Code

1. The gray code is a binary numeral system where two successive numbers differ in only one bit. 2....

easy

Basics Of Bit Manipulation

1. You are given a number n. 2. Print the number produced on setting its i-th bit. 3. Print the nu...

easy

Print Value Of Rsb Mask

1. You are given a number n. 2. You have to print the right-most set bit mask.

easy

Kernighans Algorithm

1. You are given a number n. 2. You have to count the number of set bits in the given number.

easy

All Repeating Except One

1. You are given an array of numbers. 2. All numbers occur twice in the array except one. 3. You h...

easy

All Repeating Except Two

1. You are given an array of numbers. 2. You have to find 2 non-repeating numbers in an array. 3....

easy

All Repeating Three Times Except One

1. You are given an array of numbers. 2. All numbers occur thrice in the array except one. 3. You...

easy

One Repeating And One Missing

1. You are given an array of length n containing numbers from 1 to n. 2. One number is present twic...

easy

Flip Bits To Convert A To B

1. You are given two numbers A and B. 2. You have to print the count of bits needed to be flipped t...

easy

Copy Set Bits In A Range

1. You are given two numbers A and B. 2. You are given two more numbers left and right, representin...

easy

Check Divisibility By 3

1. You are given a binary string which represents a number. 2. You have to check whether this numbe...

easy

Print Binary And Reverse Bits

1. You are given a number. 2. You have to print its binary representation. 3. You also have to rev...

easy

Count Set Bits In First N Natural Numbers

1. You are given a number n. 2. You have to print the count of set bits of first n natural numbers.

easy

Is A Power Of 2

1. You are given a number n. 2. You have to check whether it is a power of 2 or not.

easy

Solve 7n By 8

1. You are given a number n. 2. You have to calculate the value of 7n/8 without using division and...

easy

Swap All Odd And Even Bits

1. You are given a number n. 2. You have to swap all odd position bits with even position bits. 3....

easy

Sum Of Bit Differences Of All Pairs

1. You are given an array of n numbers. 2. You have to find the sum of bit differences in all pairs...

easy

Josephus Special

1. You are given an integer N which represents the total number of soldiers standing in a circle...

easy

Minimum Number Of Software Developers

1. You are given N strings which represents N different skills related to I.T field. 2. You are wor...

easy

Number Of Valid Words

1. You are given N number of words. 2. You are given M puzzles in the form of M strings. 3. For a...

hard

Triplets - 1

1. You are given an array(arr) of N numbers. 2. You have to select three indices i,j,k following th...

easy

Reduce N To 1

1. You are given a positive number N. 2. You have to find the minimum number of operations required...

easy

Pepcoder And Bits

1. Pepcoder is feeling confident after solving many problems on Bit Manipulation. 2. So, his teache...

easy

Xor Of Sum Of All Pairs

1. You are given an array of integers. 2. You have to find the XOR of sum of all pairs in the array...

easy

Abbreviation 1 - Using Bits

1. You are given a word. 2. You have to generate all abbrevations of that word. Note - Use bit man...

easy

Utf - 8 Encoding

1. You are given an array of integers. 2. You are required to test whether the array represents a v...

easy

Sudoku Using Bit Manipulation

1. You are give a partially filled 9*9 2-D array(arr) which represents an incomplete sudoku state....

medium

N Queens Using Bit

1. You are given a number n, the size of a chess board. 2. You are required to place n number of qu...

medium

Min Xor Pairs

1. You are given an array of distinct integers. 2. You have to print all pairs of integers in the a...

easy

Nth Palindromic Binary

1. You are given an integer N. 2. You have to find the N-th number whose binary representation is a...

easy

Is A Power Of 4

<a href="https://leetcode.com/problems/power-of-four/">https://leetcode.com/problems/power-of-...

easy

Xor Queries Of A Subarray

https://leetcode.com/problems/xor-queries-of-a-subarray/

medium

Minimum Flips To Make A Or B Equal To C

https://leetcode.com/problems/minimum-flips-to-make-a-or-b-equal-to-c/

easy

Find Longest Awesome Substring

<a href="https://leetcode.com/problems/find-longest-awesome-substring/">https://leetcode.com/p...

medium