## Remove all 1s from the adjacent left of 0s in a Binary Array

Given a binary array arr[], the task is to find the number of operations required to remove all 1s from the adjacent left of 0s.… Read More »

Given a binary array arr[], the task is to find the number of operations required to remove all 1s from the adjacent left of 0s.… Read More »

Given a positive integer N, the task is to count all possible distinct binary strings of length N such that there are no consecutive 1’s.… Read More »

Given a gold bar of length N with N equal markings, the task is to find the minimum number of cuts required to pay the… Read More »

Given an integer N. The task is to reduce the given number N to 1 in minimum number of given operations. You can perform any… Read More »

Given the size of a binary array consisting of 0’s only as n and an integer m which is the number of flips allowed from… Read More »

Given a binary matrix. In a single operation, you are allowed to choose two adjacent elements and invert their parity. The operation can be performed… Read More »

Given an N * N matrix where N is odd with all 0 values except for a single cell which has the value 1. The… Read More »

Given two integer A and B, the task is to check whether the binary representation of B can be generated by permuting the binary digits… Read More »

Given an array arr[] of N elements, the task is to find the maximum number of consecutive 1’s in the binary representation of an element… Read More »

Given a range [L, R], the task is to find the maximum bitwise OR of some pair (a, b) from the given range. Examples: Input:… Read More »

Given a binary pattern patt and Q queries where each query consists of a range [L, R], for every query the task is to find… Read More »

Given Q queries where each query consists of an integer N and the task is to find the smallest integer greater than N such that… Read More »

Given a binary array of 0’s and 1’s, the task is to find the number of ways to erase exactly one element from this array… Read More »

Given a number N, the task is to find the maximum distance between two 1’s in the binary representation of given N. Print -1 if… Read More »

Given a binary matrix of size N * M, the task is to find the largest area sub-matrix such that all elements in it are… Read More »