# 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