## Construct a string that has exactly K subsequences from given string

Given a string str and an integer K, the task is to find a string S such that it has exactly K subsequences of given… Read More »

- Number of factors of very large number N modulo M where M is any prime number
- Check if there exists a number with X factors out of which exactly K are prime
- Count of divisors of product of an Array in range L to R for Q queries
- Distinct Prime Factors of an Array
- Count of Nodes whose both immediate children are its prime factors
- Count numbers from range whose prime factors are only 2 and 3 using Arrays | Set 2
- Check if a number exists having exactly N factors and K prime factors
- Print all Coprime path of a Binary Tree
- Check if a number can be expressed as a product of exactly K prime divisors
- Count of pairs in an array whose product is a perfect square
- Minimize the cost of selecting two numbers whose product is X
- Count of nodes in a Binary Tree whose child is its prime factors
- Find the row whose product has maximum count of prime factors
- Check if a number has prime count of divisors
- Maximum number of prime factors a number can have with exactly x factors
- Find pairs of elements from two different arrays whose product is a perfect square
- Count the nodes in the given tree whose weight is a powerful number
- Count pairs in Array whose product is a Kth power of any positive integer
- Find if it is possible to make all elements of an array equal by the given operations
- Sum of Maximum and Minimum prime factor of every number in the Array
- Greatest odd factor of an even number
- Count all pairs of divisors of a number N whose sum is coprime with N

Given a string str and an integer K, the task is to find a string S such that it has exactly K subsequences of given… Read More »

Given two numbers N and K, the task is to find the minimum value X such that N < X*K. Examples: Input: N = 8,… Read More »

Given an integer N, the task is to count the number of square-free divisors of the given number. A number is said to be square-free,… Read More »

Given an array arr[] of N integers, and a range L to R, the task is to find the total number of elements in the… Read More »

Given two integers N and M, the task is to find out minimum number of operations required to convert N to M. Each operation involves… Read More »

Given two integers N and K, the task is to find the first element for every set of K consecutive elements which have exactly K… Read More »

Given a number X, the task is to find the minimum number N such that the sum of the count of all factors from 1… Read More »

Given a positive integer N, the task is to find the total number of distinct power of prime factor of the given number N. Examples:… Read More »

Given a number N, the task is to find the number which is less than or equals to N whose product of prime factors is… Read More »

Given an integer N, the task is to count all pairs of divisors of N such that the sum of each pair is coprime with… Read More »

Given an even number N, the task is to find the greatest possible odd factor of N. Examples: Input: N = 8642 Output: 4321 Explanation:… Read More »

Given two positive integers L and R, the task is to count the elements from the range [L, R] whose prime factors are only 2… Read More »

Given two numbers N and K, the task is to find whether an integer X exists such that it has exactly N factors and K… Read More »

Given an integer X, denoting the number of factors of a positive integer N can have. the task is to find the maximum number of… Read More »

Given a tree, and the weights of all the nodes, the task is to count the number of nodes whose weight is a Powerful Number.… Read More »