## Delete all Prime Nodes from a Singly Linked List

Given a singly linked list containing N nodes, the task is to delete all nodes from the list which are prime. Examples: Input : List… Read More »

## Delete all Prime Nodes from a Doubly Linked List

Given a doubly linked list containing N nodes, the task is to delete all nodes from the list which are prime. Examples: Input: List =… Read More »

## Find two distinct prime numbers with given product

Given a number N (greater than 2 ). The task is to find two distinct prime numbers whose product will be equal to the given… Read More »

## Numbers less than N which are product of exactly two distinct prime numbers

Given a number . The task is to find all such numbers less than N and are a product of exactly two distinct prime numbers.… Read More »

## Number of Co-prime pairs from 1 to N with product equals to N

Given a number N. The task is to find the number of co-prime pairs (a, b) from 1 to N such that their product(a*b) is… Read More »

## Length of largest sub-array having primes strictly greater than non-primes

Given an array ‘arr’ of length ‘n’. The task is to find the largest contiguous sub-array having the count of prime numbers strictly greater than… Read More »

## Find four factors of N with maximum product and sum equal to N | Set 3

Given an integer N. The task is to find all factors of N and print the product of four factors of N such that: Sum… Read More »

## Count number of primes in an array

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

## Number of prime pairs in an array

Given an array. The task is to count the possible pairs which can be formed using the elements of the array where both of the… Read More »

## C Program to Check Whether a Number is Prime or not

Given a positive integer . The task is to write a C program to check if the number is prime or not. Definition: A prime… Read More »

## Find First element in AP which is multiple of given prime

Given the first term (A) and common difference (D) of an Arithmetic Progression, and a prime number (P). The task is to find the position… Read More »

## Find next palindrome prime

Find the smallest palindrome number which is prime too and greater then given number N. Examples: Input : N = 7 Output :11 11 is… Read More »

## Number of Co-prime pairs obtained from the sum of digits of elements in the given range

Given two numbers A and B where 1 <= A <= B. The task is to count the number of pairs whose elements are co-prime… Read More »

## Cunningham chain

A Cunningham chain is a sequence of prime numbers. It is of 2 types: Cunningham chain of the first kind: It is a sequence of… Read More »

## Sum of all prime divisors of all the numbers in range L-R

Given two integers L and R. The task is to find the sum of all prime factors of every number in the range[L-R]. Examples: Input:… Read More »