# Tag Archives: binary-representation

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: L… 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
Given a binary array Arr and an integer K. If the value at index i is 1 you can change 0 to 1 with in… Read More
Given string str consisting of the characters from the set {‘o’, ‘n’, ‘e’, ‘z’, ‘r’}, the task is to find the largest possible binary number… Read More
Given an array arr[] of N positive integers and a string patt which consists of characters from the set {0, 1}, the task is to… Read More
Given an N * N binary maze where a 0 denotes that the position can be visited and a 1 denotes that the position cannot… Read More
Given an array of 0s and 1s, If any particular index i has value 1 then it is a safe index and if the value… Read More
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