## Find all powers of 2 less than or equal to a given number

Given a positive number N, the task is to find out all the perfect powers of two which are less than or equal to the… Read More »

Given a positive number N, the task is to find out all the perfect powers of two which are less than or equal to the… Read More »

Given an integer N, the task is to find the numbers which when added after being raised to the Power of 2 gives the integer… Read More »

Given an array arr[] of N integers, the task is to find the count of all the subsets which do not contain adjacent elements from… Read More »

Given an unsigned integer N. The task is to reverse all bytes of N without using a temporary variable and print the reversed number. Examples:… Read More »

Given two integers X (1 ≤ X ≤ 15) and Y. The task is to find an array of the maximum possible length N such… Read More »

Given an array arr[] of integers and an integer K, we can perform the Bitwise OR operation between any array element and K any number… Read More »

Given an integer N, the task is to find the smallest integer X such that it has no odd position set and X ≥ N.… Read More »

Given a positive integer N, the task is to count the numbers that can be represented with N bits and whose 0th and Nth bits… Read More »

Given an integer array arr[] of length N consisting of positive integers, the task is to minimize the number of steps required to reach the… Read More »

Given a number N, there are two steps to be performed. At odd step, XOR the number with any 2^M-1, where M is chosen by… Read More »

Given two binary matrices A[][] and B[][] of N X M. In a single operation, one can choose a sub-matrix (min of 2 rows and… Read More »

Given three integer n, m and k. Find the element at kth position after repeating the given operation n number of times. In a single… Read More »

Given two arrays arr1[] and arr2[], the task is to take an element from first array (say a) and one element from second array (say… Read More »

Given an array arr[], the task is to find the minimum number of elements that must be removed to make the array good. A sequence… Read More »

Given a number N, the task is to find a positive number M such that gcd(N^M, N&M) is the maximum possible and M < N.… Read More »