## Product of all the Composite Numbers in an array

Given an array of integers. The task is to calculate the product of all the composite numbers in an array. Note: 1 is neither prime… Read More »

## Count and Sum of composite elements in an array

Given an array ‘arr’ of positive integers, the task is to count the number of composite numbers in the array. Note: 1 is neither Prime… Read More »

## XOR of all Prime numbers in an Array

Given an array of integers arr[]. The task is to find the bitwise XOR of all the prime numbers present in the array. Examples: Input:… Read More »

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

Given an integer ‘k’ and an array of integers ‘arr’ (less than 10^6), the task is to find the product of every K’th prime number… Read More »

## Find the Product of first N Prime Numbers

Given a positive integer N, calculate the product of the first N prime numbers. Examples: Input : N = 3 Output : 30 Explanation :… Read More »

## 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 »