# Tag Archives: Prime Number

Given an array arr[] consisting of N integers and an integer K, the task is to count the number of array elements having exactly K… Read More
Given an integer N representing the base of a number, the task is to find the largest left-truncatable prime in the given base N. Examples:… Read More
Given two arrays L[] and R[] of sizes Q, the task is to find the number of composite magic numbers i.e numbers which are both… Read More
Given string str of length N, the task is to remove all the characters from the string whose frequencies are prime. Examples: Input: str =… Read More
Given two positive integers N and K, the task is to find the value of N after incrementing the value of N in each operation… Read More
Given array arr[] consisting of N non-negative integers, and an integer K, the task is to check if GCD of all composite numbers in the… Read More
Given a singly linked list containing N nodes, the task is to find the sum of all possible nodes of the list which contains value… Read More
Given an array arr[] consisting of N non-negative integers, the task is to count the number of array elements whose product of digits is a… Read More
Given two integers L and R, the task is to count the number of pairs from the range [L, R] whose sum is a prime… Read More
Given an integer N, the task is to count the number of pairs of prime numbers in the range [1, N] such that the difference… Read More
Given an array arr[] of size N, the task is to find the composite Fibonacci numbers present in the given array. Examples: Input: arr[] =… Read More
Given an array arr[] of size N, the task is to count the number of pairs from the given array whose product contains only a… Read More
Given an array A[] consisting of N integers, the task is to check if the sum of numbers of digits in each array element is… Read More
Given two integers L, R, and an integer K, the task is to print all the pairs of Prime Numbers from the given range whose… Read More
Given a 2D array Q[][] of size N * 2 representing queries of the form {L, R}. For each query, the task is to print… Read More