Given two integers L and R, the task is to find the count of numbers in the range [L, R] whose first and last digit… Read More

# Tag Archives: binary-representation

Given an integer N, the task is to find the decimal value of the binary string formed by concatenating the binary representations of all numbers… Read More

Given an integer N, the task is to find the minimum number of coins of the form 2i required to make a change for N… Read More

Given two numbers A and B, the task is to count the number of set bits in A and B and flip the bits of… Read More

Given two positive integers N and K, the task is to count the numbers from the range [1, N] whose Kth bit from the right,… Read More

Given a numeric string S representing a positive decimal integer, the task is to find the minimum number of positive Deci-Binary numbers required to obtain… Read More

Given a binary matrix, mat[][] of dimensions N * M, the task is to maximize the count of rows consisting only of equal elements by… Read More

Given an integer N, the task is to construct a binary matrix of size N * N such that the sum of each row and… Read More

Given three positive integers L, R, and K, the task is to find the count of numbers in the range [L, R] having K consecutive… Read More

Given a binary array, in which, moving an element from index i to index j requires abs(i – j) cost. The task is to find… Read More

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