## Minimum sum of array elements based on given Criteria

Given an array A[] of size N with entries as integers, some of the entries are -1. The task is to replace -1’s with numbers… Read More »

- Highest power of 2 that divides a number represented in binary
- Find row with maximum and minimum number of zeroes in given Matrix
- Maximum length sub-array which satisfies the given conditions
- Minimizing array sum by applying XOR operation on all elements of the array
- Find if a binary matrix exists with given row and column sums
- XOR in a range of a binary array
- Count all prefixes of the given binary array which are divisible by x
- Number of 0s and 1s at prime positions in the given array
- Distinct adjacent elements in a binary array
- Minimum length subarray of 1s in a Binary Array
- Check if matrix A can be converted to B by changing parity of corner elements of any submatrix
- Queries to answer the number of ones and zero to the left of given index
- Smallest index such that there are no 0 or 1 to its right
- Smallest number greater or equals to N such that it has no odd positioned bit set
- Maximum elements which can be crossed using given units of a and b
- Minimum sum of array elements based on given Criteria

Given an array A[] of size N with entries as integers, some of the entries are -1. The task is to replace -1’s with numbers… Read More »

Given a binary array arr[] of size N and some queries. Each query represents an index range [l, r]. The task is to find the… Read More »

Given a binary array arr[], the task is to find the length of the longest sub-array of the given array such that if the sub-array… Read More »

Given a binary array arr[] of 1’s and 0’s of length N. The task is to find the number of elements which are different with… Read More »

Given an integer N, the task is to find the smallest integer X such that it has no odd position set and X ≥ N.… Read More »

Given an array Row[] of size R where Row[i] is the sum of elements of the ith row and another array Column[] of size C… Read More »

Given an array arr[] of size N where each element is either 0 or 1. The task is to find the count of 0s and 1s which are at prime… Read More »

Given a 2D matrix containing only zeroes and ones, where each row is sorted. The task is to find the row with the maximum number… Read More »

Given binary array. The task is to find the length of subarray with minimum number of 1s. Note: It is guaranteed that there is atleast… Read More »

Given an array arr[] of N integer elements, the task is to choose an element X and apply XOR operation on every element of the… 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 a binary array of N elements and two initial values a and b. We can cross the i-th element if: If a[i] == 0,… 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 a binary array and Q queries. Every query consists of a number K, the task is to print the number of ones and zeros… Read More »

Given a binary array arr[] and an integer x, the task is to count all the prefixes of the given array which are divisible by… Read More »