Skip to content

Tag Archives: binary-representation

Given an integer N, the task is to find the minimum positive product of first N – 1 natural numbers, i.e. [1, (N – 1)],… Read More
Given a binary matrix arr[][] of dimensions N * M , the task is to count the number of right-angled triangles that can be formed… Read More
Given an array arr[] consisting of N integers, the task is to find the maximum sum of the squares of array elements possible from the… Read More
Given a boolean matrix mat[][] of size M * N, the task is to print the count of indices from the matrix whose corresponding row… Read More
Given two binary matrices mat[][] and target[][] of dimensions N * M, the task is to find the minimum cost to convert the matrix mat[][]… Read More
Given a binary array arr[] of size N, the task is to find the length of the second longest sequence of consecutive 1s present in… Read More
Given two integers L and R, the task is to count the numbers having only one unset bit in the range [L, R]. Examples: Input:… Read More
Given an array arr[] consisting of N integers, the task is to find the total number of distinct subsequences having Binary Equivalence. A subsequence has… Read More
Given a binary matrix arr[][] of dimensions M x N and Q queries of the form (x1, y1, x2, y2), where (x1, y1) and (x2,… Read More
Given two binary arrays A[] and B[], of length N and M respectively, the task is to find the number of rectangles of area K… Read More
Given two decimal numbers num1 and num2, the task is to count the number of times carry operation is required while adding the two given… Read More
Given four integers N, M, A, B where N is the number of rows and M is the number of columns, the task is to… Read More
Given a natural number N, the task is to find the largest number M having the same length in binary representation as N such that… Read More
Given a binary array arr[] of length N, and an integer K, the task is to find the maximum number of consecutive ones after flipping… Read More
Given an integer N, the task is to find the maximum frequency of set bits among all pairs of integers from 0 to N that… Read More

Start Your Coding Journey Now!