## Print all possible pair with prime XOR in the Array

Given an array arr[] of N positive integers. The task is to print all possible pairs such that their XOR is a Prime Number. Examples:… Read More »

Given an array arr[] of N positive integers. The task is to print all possible pairs such that their XOR is a Prime Number. Examples:… Read More »

Given an array arr[] of N integers, the task is to find the longest subarray where all numbers in that subarray are prime. Examples: Input:… Read More »

Given an array arr[][] consisting of Q queries where every row consists of two numbers L and R which denotes the range [L, R]; the… Read More »

Given an array arr[] of N integers, the task is to find the number of pairs (arr[i], arr[j]) such that arr[i]*arr[j] is a perfect square.… Read More »

Prerequisites: Prime Factorization using Sieve Given two arrays arr1[] and arr2[] of size M and N with distinct elements in each of the arrays, the… Read More »

Given an array arr[], the task is to find the sum of the maximum and the minimum prime factor of every number in the given… Read More »

Pre-requisite: Sieve of Eratosthenes What is Sieve of Eratosthenes algorithm? In order to analyze it, let’s take a number n and the task is to… Read More »

Given a number K, the task is to print the prime numbers present at that level given all the prime numbers are represented in the… Read More »

Given an array arr[] of N integers, the task is to remove all the prime numbers. Examples: Input: arr[] = {4, 6, 5, 3, 8,… Read More »

Given an integer N, the task is to find the count of all the primes below N which can be expressed as the sum of… Read More »

Given Q queries and an integer K where each query consists of a range [L, R] and the task is to find the count of… Read More »

Given an integer D, the task is to find the sum of all the prime numbers whose count of digits is less than or equal… Read More »

Given two integers L and R, the task is to find the minimum difference between any two prime numbers in the range [L, R]. Examples:… Read More »

Given Q queries where each query consists of an integer range [L, R], the task is to find the sum of the integers from the… Read More »

Given K arrays where the first array contains the first prime number, the second array contains the next 2 primes and the third array contains… Read More »