## Count subarrays with Prime sum

Given an array A[] of integers. The task is to count total subarrays whose sum is prime with ( size > 1 ). Examples: Input… Read More »

## XOR of Prime Frequencies of Characters in a String

Given a string containing only lowercase english alphabets. The task is to find the bitwise XOR of all the prime frequencies of the characters in… Read More »

## Sum and product of k smallest and k largest prime numbers in the array

Given an integer k and an array of integers arr, the task is to find the sum and product of k smallest and k largest… Read More »

## Sum 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 sum of every k’th prime number… Read More »

## Find the super power of a given Number

Given an integer . The task is to find the superpower from the factorization of . The Superpower is the highest power among the power… Read More »

## Sum and Product of all Composite numbers which are divisible by k in an array

Given an array arr[] of N positive integers. The task is to find the sum of all composite elements which are divisible by a given… Read More »

## Count of Prime Nodes of a Singly Linked List

Given a singly linked list containing N nodes, the task is to find the total count of prime numbers. Examples: Input: List = 15 ->… Read More »

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

## Program to find Prime Numbers Between given Interval

Given two numbers and as interval range, the task is to find the prime numbers in between this interval. Examples: Input : a = 1,… 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 »

## Primality test for the sum of digits at odd places of a number

Given an integer ‘n’, the task is to check whether the sum of digits at the odd positions (from right to left) is prime or… 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 »

## Array elements with prime frequencies

Given a string. The task is to find the count of characters whose number of occurrences is prime. Examples: Input : str = “geeksforgeeks” Output… Read More »

## Find the Product of first N Prime Numbers

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