Number of values of b such that a = b + (a^b)

Given an integer . Find the number of solutions of which satisfies the equation: a = b + (a^b) Examples: Input: a = 4 Output:… Read More »

Find two distinct prime numbers with given product

Given a number N (greater than 2 ). The task is to find two distinct prime numbers whose product will be equal to the given… Read More »

Number of Co-prime pairs from 1 to N with product equals to N

Given a number N. The task is to find the number of co-prime pairs (a, b) from 1 to N such that their product(a*b) is… Read More »

Number of divisors of a given number N which are divisible by K

Given a number and a number . The task is to find the number of divisors of N which are divisible by K. Here K… Read More »

Find the GCD of N Fibonacci Numbers with given Indices

Given indices of N Fibonacci numbers. The task is to find the GCD of the Fibonacci numbers present at the given indices. The first few… Read More »

Find triplets in an array whose AND is maximum

Given an array of positive integers of size n. Find the count of the triplets whose AND is maximum and also find that maximum given… Read More »

Minimum number of increasing subsequences

Given an array of integers of size N, you have to divide it into the minimum number of “strictly increasing subsequences” For example: let the… Read More »

Kth Smallest sum of continuous subarrays of positive numbers

Given an sorted array of positive numbers our tasks is to find the kth smallest sum of continuous subarray. Examples: Input : a[] = {1,… Read More »

Check if any square (with one colored cell) can be divided into two equal parts

Given a square of size n . There are n2 small squares inside the square n of size 1 unit each, in which any one… Read More »

Find the count of maximum contiguous Even numbers

Given an array arr[] of N elements. The task is to find the maximum number of the contiguous even numbers in the given array. Examples:… Read More »

Length of largest sub-array having primes strictly greater than non-primes

Given an array ‘arr’ of length ‘n’. The task is to find the largest contiguous sub-array having the count of prime numbers strictly greater than… Read More »

Minimum cost to buy N kilograms of sweet for M persons

Given an array of n size contains the cost of sweets in such a way that that sweet[i] is the cost of i sweets. The… Read More »

Number of steps required to convert a binary number to one

Given a binary string str, the task is to print the numbers of steps required to convert it to one by the following operations: If… Read More »

Check if elements of an array can be arranged in a Circle with consecutive difference as 1

Given an array of numbers. The task is to check if it is possible to arrange all the numbers in a circle so that any… Read More »

Find the missing value from the given equation a + b = c

Given an equation of the form: a + b = c Out of which any one of the terms , or is missing. The task… Read More »