# Tag Archives: sieve

Given a set S of having numbers 1, 2, 3, . . ., N, and an integer K, the task is to form a set… Read More
Given an integer N, the task is to generate an array arr[] having N positive integers such that arr[i] ≠ arr[j] if j is divisible… Read More
Given a positive integer N. Find the minimum number of operations needed to reduce N to 0 when N can reduced by its divisor at… Read More
Given integers N and K, the task is to find the number of factors of NCK. Since the answer can be very large return the… Read More
Given a range [L, R] and an integer K, find all the groups in the given range having at least K consecutive composite integers.  … Read More
Given two integers D and K. The task is to find the smallest number N which has at least K prime divisors and the difference… Read More
Given a 2D matrix arr[] of size N*M, the task is to find the number of rows and columns having all primes. Examples: Input: arr[]=… Read More
Given a positive integer, A. The task is to find two numbers B and C such that their product is A and their GCD should… Read More
Given an array arr[] of size N. The task is to sort the elements in arr[] based to their Highest Degree of Expression, in descending… Read More
Given a range [L, R], we need to find the count of total numbers of prime numbers in the range [L, R] where 0
Given a range [L, R], we need to find the count of total numbers of prime numbers in the range [L, R] where 0 Output:  … Read More
Given a range [L, R], we need to find the count of total numbers of prime numbers in the range [L, R] where 0 Output:  … Read More
Given a range [L, R], we need to find the count of total numbers of prime numbers in the range [L, R] where 0 <=… Read More
Given a range [L, R], we need to find the count of total numbers of prime numbers in the range [L, R] where 0
Given an array arr[] consisting of N positive integers, the task is to check if the product of all the elements of the given array… Read More