Given a number, the task is to find XOR of count of 0s and count of 1s in binary representation of a given number. Examples: Input… Read More
Tag Archives: Bitwise-XOR
Given pointer to the head node of a linked list, the task is to reverse the linked list. Examples: Input : Head of following linked… Read More
Given an array of integers. Find the pair in an array that has a minimum XOR value. Examples : Input : arr[] = {9, 5,… Read More
Given an array of integers, the task is to find maximum XOR value of a subarray of size K. Examples : Input : arr[] =… Read More
Given a sorted singly linked list and a value x, the task is to find pair whose sum is equal to x. We are not… Read More
Given an array of distinct positive integers and a number x, find the number of pairs of integers in the array whose XOR is equal… Read More
XOR Encryption is an encryption method used to encrypt data and is hard to crack by brute-force method, i.e generating random encryption keys to match… Read More
Given a square matrix (N X N), the task is to find the maximum XOR value of a complete row or a complete column. Examples… Read More
Given a number n, the task is to find the XOR from 1 to n. Examples : Input : n = 6Output : 7// 1 ^… Read More
Given a number n, the task is to check whether this number is a multiple of 4 or not without using +, -, * ,/… Read More
Given a positive integer n, find count of positive integers i such that 0 <= i <= n and n+i = n^i Examples : Input… Read More
Previous posts on this topic : Minimax Algorithm in Game Theory, Evaluation Function in Game Theory, Tic-Tac-Toe AI – Finding optimal move, Alpha-Beta Pruning.Zobrist Hashing… Read More
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