# Tag Archives: Prime Number

Given a number N. Find number of almost primes from 1 to . A number is called almost if it has exactly two distinct prime factors. Note:… Read More
Given two positive integers start and end. The task is to write a Python program to print all Prime numbers in an Interval. Definition: A… Read More
Given two integers n and m. Check n^2 – m^2 is prime or not. n and m can be very large.  Examples:  Input : n… Read More
Given a number x, Find y (y > 0) such that x*y + 1 is not a prime. Examples:  Input : 2 Output : 4… Read More
Given a positive integer N, The task is to write a Python program to check if the number is Prime or not in Python. Examples: … Read More
Given a range [L, R]. The task is to find the sum of all the prime numbers in the given range from L to R… Read More
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
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
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
Given a number . The task is to find all such numbers less than N and are a product of exactly two distinct prime numbers. For Example,… Read More
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
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
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
Given an array A of integers. We can remove at most one index from the array. Our goal is to maximize the length of the… Read More
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