Skip to content

Tag Archives: Prime Number

Given a set S of having numbers 1, 2, 3, . . ., N, and an integer K, the task is to form a set… Read More
Why do we check up to the square root of a number to determine if that number is prime? Prime numbers are natural numbers greater… Read More
Given two integers L and R, where  L < R, the task is to find Co-prime numbers X and Y such that L <= X… Read More
Given an array A[] of size N. An array has to be created using the given array considering the following conditions. If the index is… Read More
Given an array arr[] of size N, the task is to find the maximum subarray sum that can be obtained such that the length of… Read More
Given a number N, the task is to check whether N has 7 divisors or not. Examples: Input: 64Output: 1 Explanation: 1, 2, 4, 8, 16,… Read More
Given a number N, the task is to find the primes within range [1, N] which is also a part of a Tribonacci series starting… Read More
Given an array arr[] having N integers, the task is to find the GCD of all the numbers in the array which are not prime.… Read More
Given an array of integers arr[] of size N and an integer K, the task is to find the smallest prime such that it gives… Read More
Given an array arr[] of size N having only positive elements, the task is to find the number of primes less than the number formed… Read More
Given integers L and R, the task is to find the number of integers in range [L, R] (say X) which does not form a… Read More
Given an integer N, the task is to generate an array of N distinct integers. Such that the GCD of all the elements of the… Read More
Given two positive integers L and R, the task is to find the count of numbers in the range [L, R] which are not divisible… Read More
Given a range [L, R] and an integer K, find all the groups in the given range having at least K consecutive composite integers.  … Read More
Given a string S representing an N digit integer, the task is to find the maximum number of digits that can be removed such that… Read More

Start Your Coding Journey Now!