## Smallest power of 4 greater than or equal to N

Given an integer N, the task is to find the smallest power of four greater than or equal to N. Examples: Input: N = 12… Read More »

## Find the number of Chicks in a Zoo at Nth day

Given that a zoo has a single chick. A chick gives birth to 2 chicks everyday and the life expectancy of a chick is 6… Read More »

## Fibonacci Power

Given a number n. You are required to find ( Fib(n) ^ Fib(n) ) % 10^9 + 7, where Fib(n) is the nth fibonacci number.… Read More »

## Count number of binary strings of length N having only 0’s and 1’s

Given an integer N, the task is to count the number of binary strings of length N having only 0’s and 1’s. Note: Since the… Read More »

## Find 2^(2^A) % B

Given two integers A and B, the task is to calculate 22A % B. Examples: Input: A = 3, B = 5 Output: 1 223… Read More »

## Count of numbers having only 1 set bit in the range [0, n]

Given an integer n, the task is to count the numbers having only 1 set bit in the range [0, n]. Examples: Input: n =… Read More »

## Sum of the series 1^1 + 2^2 + 3^3 + ….. + n^n using recursion

Given an integer n, the task is to find the sum of the series 11 + 22 + 33 + ….. + nn using recursion.… Read More »

## Third last digit in 5^N for given N

Given a positive integer N. The task is to find the value of 3rd digit from last (right-most) of 5N. Examples: Input : N =… Read More »

## Find the count of numbers that can be formed using digits 3, 4 only and having length at max N.

Given a number N. Find the count of such numbers that can be formed using digits 3 and 4 only and having length at max… Read More »

## Check if a number can be represented as sum of non zero powers of 2

Given an integer N, the task is to check whether N can be represented as the sum of powers of 2 where all the powers… Read More »

## Sum of minimum element of all sub-sequences of a sorted array

Given a sorted array A of n integers. The task is to find the sum of minimum of all possible subsequences of A. Note: Considering… Read More »

## Minimum number of given powers of 2 required to represent a number

Given an integer x and an array arr[] each element of which is a power of 2. The task is to find the minimum number… Read More »

## Maximum GCD from Given Product of Unknowns

Given two integers N and P where P is the product of N unknown integers, the task is to find the GCD of those integers.… Read More »

## Count number of trailing zeros in (1^1)*(2^2)*(3^3)*(4^4)*..

Given an integer n, the task is to find the number of trailing zeros in the function i.e. f(n) = 11 * 22 * 33… Read More »

## Largest subset where absolute difference of any two element is a power of 2

Given an array arr[] of distinct elements -109 ≤ ai ≤ 109. The task is to find the largest sub-set from the given array such… Read More »