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

- Sieve of Eratosthenes
- Efficient program to print all prime factors of a given number
- Check whether a number is semiprime or not
- Given a number, find the next smallest palindrome
- Prime Numbers
- Primality Test | Set 1 (Introduction and School Method)
- Euler's Totient Function
- Segmented Sieve
- Primality Test | Set 2 (Fermat Method)
- Find two prime numbers with given sum
- Primality Test | Set 3 (Miller–Rabin)
- Print prime numbers in a given range using C++ STL
- Shortest path to reach one prime to other by changing single digit at a time
- Program to find sum of prime numbers between 1 to n
- Least prime factor of numbers till n
- k-Rough Number or k-Jagged Number
- Lemoine's Conjecture
- Sieve of Sundaram to print all primes smaller than n
- Nearest prime less than given number n
- Check if a number can be written as a sum of 'k' prime numbers
- Count Primes in Ranges
- Program for Goldbach’s Conjecture (Two Primes with given Sum)
- Primality Test | Set 4 (Solovay-Strassen)
- Minimum insertions to make a Co-prime array
- Print all prime factors and their powers
- Product of unique prime factors of a number
- k-th prime factor of a given number
- Numbers with exactly 3 divisors
- Sieve of Atkin
- Newman–Shanks–Williams prime

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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

Given a positive integer N where . The task is to find the smallest prime palindrome greater than or equal to N. Examples: Input: 8… Read More »

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 »

Given a singly linked list containing N nodes, the task is to find the minimum and maximum prime number. Examples: Input : List = 15… Read More »

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 »

Given a singly linked list containing N nodes, the task is to find the sum and product of all nodes from the list which are… Read More »