## Largest factor of a given number which is a perfect square

Given a number . The task is to find the largest factor of that number which is a perfect square. Examples: Input : N =… Read More »

## Maximum no. of contiguous Prime Numbers in an array

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

## Check if a number is a Trojan Number

Given a Number . The task is to check if N is a Trojan Number or not. Trojan Number is a number that is a… Read More »

## Minimum and Maximum prime numbers in an array

Given an array arr[] of N positive integers. The task is to find the minimum and maximum prime elements in the given array. Examples: Input:… Read More »

## Sort prime numbers of an array in descending order

Given an array of integers ‘arr’, the task is to sort all the prime numbers from the array in descending order in their relative positions… Read More »

## Count number of integers less than or equal to N which has exactly 9 divisors

Given a number N(1<=N<=109), the task is to find the total number of integers less than equal to n which have exactly 9 divisors. Examples:… Read More »

## Check if a number is Primorial Prime or not

Given a positive number N, the task is to check if N is a primorial prime number or not. Print ‘YES’ if N is a… Read More »

## Pair of prime numbers with a given sum and minimum absolute difference

Given an integer ‘sum’ (less than 10^8), the task is to find a pair of prime numbers whose sum is equal to the given ‘sum’… Read More »

## Kth prime number greater than N

Given a number N, the task is to print the Kth prime number greater than N. Note: N and K are so given such that… Read More »

## Difference between the largest and the smallest primes in an array

Given an array of integers where all the elements are less than 10^6. The task is to find the difference between the largest and the… Read More »

## Numbers in range [L, R] such that the count of their divisors is both even and prime

Given a range [L, R], the task is to find the numbers from the range which have the count of their divisors as even as… Read More »

## Sum of every K’th prime number in an array

Given an array of integers (less than 10^6), the task is to find the sum of all the prime numbers which appear after every (k-1)… Read More »

## Sum of all prime numbers in an Array

Given an array arr[] of N positive integers. The task is to write a program to find the sum of all prime elements in the… Read More »

## Product of all prime numbers in an Array

Given an array arr[] of N positive integers. The task is to write a program to find the product of all the prime numbers of… Read More »

## Sum of all the prime numbers in a given range

Given a range [l, r], the task is to find the sum of all the prime numbers within that range. Examples: Input : l=1 and… Read More »