Length of longest subsequence whose XOR value is odd
Given an array arr[] of N positive integers, the task is to find the length of the longest subsequence such that Bitwise XOR of all… Read More »
Given an array arr[] of N positive integers, the task is to find the length of the longest subsequence such that Bitwise XOR of all… Read More »
Given an array arr[] of N strings. The task is to find the count of all possible pairs of strings such that their concatenations has… Read More »
Given an integer N which can be represented in 32 bit, the task is to find another integer X that has at most K bits… Read More »
Given an array arr[] of size N and a matrix Q consisting of queries of the following two types: 1 L R : Print the… Read More »
Given an integer N, the task is to calculate the sum of first N natural numbers adding all powers of 2 twice to the sum.Examples: … Read More »
Given a number N, the task is to find the sum of Hamming difference of consecutive numbers from 0 to N. Hamming Distance between two… Read More »
Given two integers A and B, the task is to print the integer among the two, which will be converted to an odd integer by… Read More »
Given two positive integers S and X which represents the sum and Bitwise XOR of all the elements of an array arr[]. The task is… Read More »
Given an array integer arr[] of size N and Q queries. Each query is of the form (L, R), where L and R are indices… Read More »
Given an array arr[] of N positive integers and a number K, the task is to find the maximum value of bitwise OR of the… Read More »
Given a positive integer N, the task is to find the largest integer M such that 0 <= M < N and XOR(M, N) is… Read More »
Given a binary string s and a number K, the task is to find the maximum number of 0s that can be replaced by 1s… Read More »
Given a positive integer N, the task is to find out the sum of all consecutive bit differences from 0 to N. Note: If the bit… Read More »
Given an array arr[], the task is to generate a modified array such that all its elements are maximized by swapping of bits.Examples: Input: arr[]… Read More »
Given an array of N elements which denotes the array representation of binary heap, the task is to find the leaf nodes of this binary… Read More »