Beginner-2
Bit Manipulation All the input data given to us, as we know is stored in its binary form in the system’s memory. Binary Form implies in its equivalent representation in form of bits. There is a lot of cool stuff which can be done using bits and their manipulations. Have a look at this tutorial : https://www.hackerearth.com/practice/basic-programming/bit-manipulation/basics-of-bit-manipulation/tutorial/ https://www.interviewbit.com/courses/programming/topics/bit-manipulation/ Another thing to keep in mind is that by default when we talk about bits, we think of base-2 representation, however, there are a number of problems where we can expand similar concepts to a base-N representation. We can carry out the bit manipulations by using functions which work for that particular representation and perform tasks akin to the normal bitwise operators. For eg, in this question, one way is to create a function which takes a xor of two numbers with respect to a ...