## Game Theory in Balanced Ternary Numeral System | (Moving 3k steps at a time)

Just like base 2 Binary numeral system having 0s and 1s as digits, Ternary(Trinary) Numeral System is a base 3 number system having 0s, 1s… Read More »

- Subset array sum by generating all the subsets
- Sum of XOR of all subarrays
- Smallest power of 2 which is greater than or equal to sum of array elements
- Number of pairs whose sum is a power of 2
- Meta Binary Search | One-Sided Binary Search
- Sum of bitwise AND of all subarrays
- Printing all subsets of {1,2,3,...n} without using array or loop
- Represent n as the sum of exactly k powers of two | Set 2
- Sum of Bitwise-OR of all subarrays of a given Array | Set 2
- Range Sum Queries and Update with Square Root
- Highest power of two that divides a given number
- Count pairs with Bitwise XOR as EVEN number
- Find k numbers which are powers of 2 and have sum N | Set 1
- Sum of bitwise AND of all submatrices
- XOR of XORs of all sub-matrices
- Minimum swaps required to convert one binary string to another
- Sum of Bitwise-OR of all Submatrices
- Count unordered pairs (i,j) such that product of a[i] and a[j] is power of two
- Occurrences of a pattern in binary representation of a number
- Minimum number of operations required to sum to binary string S
- Count pairs (A, B) such that A has X and B has Y number of set bits and A+B = C
- Distance between two nodes of binary tree with node values from 1 to N
- Range and Update Sum Queries with Factorial
- Maximum Bitwise AND pair from given range
- Check whether bitwise OR of N numbers is Even or Odd
- First and Last Three Bits
- Find subsequences with maximum Bitwise AND and Bitwise OR
- Subset Sum Queries in a Range using Bitset
- Check if the binary representation of a number has equal number of 0s and 1s in blocks
- Number of leading zeros in binary representation of a given number

Just like base 2 Binary numeral system having 0s and 1s as digits, Ternary(Trinary) Numeral System is a base 3 number system having 0s, 1s… Read More »

Given a binary string str, the task is to find the largest power of 2 that divides the decimal equivalent of the given binary number.… Read More »

Given two binary matrices A[][] and B[][] of N X M. In a single operation, one can choose a sub-matrix (min of 2 rows and… Read More »

Given three integer n, m and k. Find the element at kth position after repeating the given operation n number of times. In a single… Read More »

Given an array of strings arr[]. The task is to find the count of unordered pairs of strings (arr[i], arr[j]), which on concatenation contains each… Read More »

Given a range [L, R], the task is to find the XOR of all the integers in the given range i.e. (L) ^ (L +… Read More »

Given a number. The task is to count the number of Trailing Zero in Binary representation of a number using bitset. Examples: Input : N… Read More »

Given two numbers N and K. The task is to find the index of the K-th set bit in the number from the right. Note:… Read More »

Given an array of integers, the task is to find the AND of all elements of each subset of the array and print the minimum… Read More »

Given an integer n, the task is to count the numbers having only 1 set bit in the range [0, n]. Examples: Input: n =… Read More »

Given a NxN matrix, the task is to find the sum of bit-wise OR of all of its rectangular sub-matrices. Examples: Input : arr[][] =… Read More »

Given a NxN matrix, the task is to find the sum of bit-wise AND of all of its rectangular sub-matrices. Examples: Input : arr[][] =… Read More »

Given an integer x and an array arr[] each element of which is a power of 2. The task is to find the minimum number… Read More »

Given a N*N binary matrix, task is to find the count of rectangular sub-matrices with OR value 1. Examples: Input : arr[][] = {{0, 0,… Read More »

Given a ‘N*N’ matrix, the task is to find the XOR of XORs of all possible sub-matrices. Examples: Input :arr = {{3, 1}, {1, 3}}… Read More »