Skip to content

Tag Archives: Bitwise-XOR

Given three variables, a, b and c, swap them without temporary variable.Example :   Input : a = 10, b = 20 and c = 30… Read More
Given a binary array of size n where n > 3. A true (or 1) value in the array means active and false (or 0)… Read More
Given an array of n unique integers where each element in the array is in range [1, n]. The array has all distinct elements and… Read More
Inplace Operators in Python | Set 1(iadd(), isub(), iconcat()…) More functions are discussed in this articles. 1. ixor() :- This function is used to assign… Read More
Given a function rand50() that returns 0 or 1 with equal probability, write a function that returns 1 with 75% probability and 0 with 25%… Read More
Given an array that contains odd number of occurrences for all numbers except for a few elements which are present even number of times. Find… Read More
Given two integers a and b, how can we evaluate the sum a + b without using operators such as +, -, ++, –, …?… Read More
It is recommended to refer Interesting facts about Bitwise Operators as a prerequisite.1. How to set a bit in the number ‘num’ :If we want… Read More
Given two arrays that are duplicates of each other except one element, that is one element from one of the array is missing, we need… Read More
Binary Number is the default way to store numbers, but in many applications, binary numbers are difficult to use and a variety of binary numbers… Read More
Given an array arr[] of n numbers and a number K, find the number of subsets of arr[] having XOR of elements as KExamples : … Read More
Given an set of positive integers. find the maximum XOR subset value in the given set. Expected time complexity O(n).Examples: Input: set[] = {2, 4,… Read More
We have discussed different approaches to swap two integers without the temporary variable. How to swap into a single line without using the library function?1)… Read More
The question is to find XOR of the XOR’s of all subsets. i.e if the set is {1,2,3}. All subsets are : [{1}, {2}, {3},… Read More
Given an array of integers. find the maximum XOR subarray value in the given array. Expected time complexity O(n). Examples:  Input: arr[] = {1, 2,… Read More

Start Your Coding Journey Now!