## Square free semiprimes in a given range using C++ STL

Given two integers L and R (L < = R). The task is to find all square free semiprimes in the range L to R… Read More »

- New Algorithm to Generate Prime Numbers from 1 to Nth Number
- Generate elements of the array following given conditions
- Program to find the Nth Prime Number
- Length of the longest increasing subsequence such that no two adjacent elements are coprime
- Check if factorial of N is divisible by the sum of squares of first N natural numbers
- Longest subsequence such that every element in the subsequence is formed by multiplying previous element with a prime
- Minimize the cost to split a number
- Check if each element of the given array is the product of exactly K prime numbers
- Find the sum of the ascii values of characters which are present at prime positions
- Maximize the size of array by deleting exactly k sub-arrays to make array prime
- Find a sequence of N prime numbers whose sum is a composite number
- Rearrange the array to maximize the number of primes in prefix sum of the array
- Print all Semi-Prime Numbers less than or equal to N
- Check if the given string is vowel prime
- Number of 0s and 1s at prime positions in the given array
- Largest number not greater than N which can become prime after rearranging its digits
- Print all numbers whose set of prime factors is a subset of the set of the prime factors of X
- Check whether factorial of N is divisible by sum of first N natural numbers
- Check if product of array containing prime numbers is a perfect square
- Find prime numbers in the first half and second half of an array
- Count the number of primes in the prefix sum array of the given array
- Minimum operations required to convert X to Y by multiplying X with the given co-primes
- Ramanujan Prime
- Sum of Semi-Prime Numbers less than or equal to N
- Find prime number K in an array such that (A[i] % K) is maximum
- Check if product of first N natural numbers is divisible by their sum
- Triangle of numbers arising from Gilbreath's conjecture
- Count of distinct sums that can be obtained by adding prime numbers from given arrays
- Product of Primes of all Subsets
- Check whether N is a Dihedral Prime Number or not

Given two integers L and R (L < = R). The task is to find all square free semiprimes in the range L to R… Read More »

Given an integer N. The task is to find the Nth prime number. Examples: Input : 5 Output : 11 Input : 16 Output :… Read More »

Given a number N, the task is to check if its first and last digit is a prime number and their sum is less than… Read More »

The task is to find the triangle of numbers arising from Gilbreath’s conjecture. Gilbreath’s conjecture: It is observed that given a sequence of prime numbers,… Read More »

Given an array a[] of size N. The value of a subset is the product of primes in that subset. A non-prime is considered to… Read More »

Given an integer N. The task is to find the sum of the first N prime numbers which don’t contain any odd primes as their… Read More »

The Nth Ramanujan prime is the least integer Rn for which where π(x) is a prime-counting function Note that the integer Rn is necessarily a… Read More »

Given an array arr of size N. The task is to find the prime numbers in the first half (up to index N/2) and the… Read More »

Given a string str of lowercase English alphabets, the task is to check whether the string is a vowel prime or not. A string is… Read More »

Given four integers X, Y, X2%P, Y2%P, where P is a prime number. The task is to find prime P. Note: Answer always exsits. Examples:… Read More »

Given four integers X, Y, P and Q such that X ≤ Y and gcd(P, Q) = 1. The task is to find minimum operation… Read More »

Given a sorted array of N integers. The task is to find the longest subsequence such that every element in the subsequence is reachable by… Read More »

Given an integer N, the task is to find the sum of semi-prime numbers which are less than or equal to N. A Semi prime… Read More »

Given an integer N, the task is to partition the first N natural numbers in two non-empty sets such that the sum of these set… Read More »

Given a string str of size N. The task is to find out whether it is possible to rearrange characters in string str so that… Read More »