## All pairs whose xor gives unique prime

Given an array arr[], the task is to count all the pairs whose xor gives the unique prime, i.e. no two pairs should give the… Read More »

## Largest palindromic prime in an array

Given an array arr[] of integers, the task is to print the largest palindromic prime from the array. If no element from the array is… Read More »

## Check if the string satisfies the given condition

Given a string str, the task is to check whether the count of vowels in the given string is prime or not. If its prime… Read More »

## Check if the sum of primes is divisible by any prime from the array

Given an array arr[], the task is to check whether the sum of primes in the array is divisible by any of the primes in… Read More »

## Minimum absolute difference of a number and its closest prime

Given a positive integer N, the task is to find the absolute difference of N and the prime number closest to N . Note: The… Read More »

## Count characters in a string whose ASCII values are prime

Given a string S. The task is to count and print the number of characters in the string whose ASCII values are prime. Examples: Input:… Read More »

## Sum of elements in an array having prime frequency

Given an array arr, the task is to find the sum of the elements which have prime frequencies in the array. Note: 1 is neither… Read More »

## Sum and Product of Prime Frequencies of Characters in a String

Given a string str containing only lowercase English alphabets, the task is to find the sum and product of all the prime frequencies of the… Read More »

## Sort an array according to the increasing count of distinct Prime Factors

Given an array of integers. The task is to sort the given array on the basis increasing count of distinct prime factors. Examples: Input :… Read More »

## Check whether the sum of prime elements of the array is prime or not

Given an array having N elements. The task is to check if the sum of prime elements of the array is prime or not. Examples:… Read More »

## Check if a prime number can be expressed as sum of two Prime Numbers

Given a prime number . The task is to check if it is possible to express as sum of two separate prime numbers. Note: The… Read More »

## Check whether count of distinct characters in a string is Prime or not

Given a string of lowercase English alphabets. The task is to check if the count of distinct characters in the string is prime or not.… Read More »

## Check whether the frequencies of all the characters in a string are prime or not

Given a string , the task is to check if the frequencies of all the characters of the string are prime or not. If all… Read More »

## Find the number of primitive roots modulo prime

Given a prime . The task is to count all the primitive roots of . A primitive root is an integer x (1 <= x… Read More »

## Smallest prime number missing in an array

Given an array containing n distinct numbers. The task is to find the smallest prime which is not present in the array. Note: If there… Read More »