Articles by Tag #bitmanipulation

Browse our collection of articles on various topics related to IT technologies. Dive in and explore something new!

Single Number I

Problem We have to find the number that is present only once. Brute force approach will be to use...

Learn More 0 0Sep 18 '24

Minimize XOR

Problem TC : (n+m) where n and m are no. of bits in num1 and num2 respectively /* use...

Learn More 0 0Jan 16

Single number 3

Problem We will use the concept of buckets, we want to make sure that two numbers that appear only...

Learn More 0 0Sep 20 '24

Power set

Problem Backtracking approach: TC:(2^n) i.e. exponential time complexity (Since we are left with...

Learn More 0 0Sep 18 '24

Bit Manipulation tips and tricks

Swap two numbers without using the temp variable a = a^b b = a^b = (a^b)^b = a ( since...

Learn More 0 0Sep 17 '24

Xor of N numbers

Given an integer number N, find the exor of the range 1 to N exor of 1 ^ 2 ^ 3 ^4 ^.....N; Brute...

Learn More 0 0Sep 21 '24