## Sum of bitwise OR of all subarrays

Give an array of positive integers, find the total sum after performing the bit wise OR operation on all the sub arrays of a given… Read More »

Give an array of positive integers, find the total sum after performing the bit wise OR operation on all the sub arrays of a given… Read More »

Given positive integers N, L, and R, we have to find the maximum value of N ⊕ X, where X ∈ [L, R]. Examples: Input… Read More »

Given a number n, we need to check if it can be expressed as 2x + 2y or not . Here x and y can… Read More »

Given N strings which represents all integers from 0 to N in binary format except any one. The task is to find the missing number.… Read More »

Given an integer N. The task is to write a program to find the parity of the given number. Note: Parity of a number is… Read More »

Given an array of integers arr[]. The task is to find the maximum sum of set bits(of the array elements) without adding the set bits… Read More »

Given a non-negative number n and two values l and r. The problem is to check whether or not n has an alternate pattern in… Read More »

The task is to Increment a number without using ++ and + operators. Examples: Input : 3 Output : 4 Input : 9 Output :… Read More »

Given two 32-bit numbers, N and M, and two-bit positions, i and j. Write a method to insert M into N such that M starts… Read More »

Given an array of N integers and a number X. The task is to find the index of first element which is greater than or… Read More »

Given an array of N numbers, the task is to find the maximum sum that can be obtained by adding numbers with the same number… Read More »

Given an array of N integers, the task is to find the number of pairs (i, j) such that A[i] & A[j] is odd. Examples:… Read More »

Given an array, find the XOR of sum of all pairs in an array. Examples: Input : arr[] = {1, 2, 3} Output : 0… Read More »

Given an array of N integers. The task is to find the number of pairs (i, j) such that A[i] & A[j] is odd. Examples:… Read More »

Given an array A[] of size N. The task is to find the how many pair(i, j) exists such that A[i] OR A[j] is even.… Read More »