# Tag Archives: HCF

Given an array arr[] of positive numbers. The task is to check if there exists any subset of any size such that after multiplying each… Read More
Given an array arr[] of N positive integers, the task is to find the minimum number of operations required to make the GCD of array… Read More
Given an array arr[] consisting of N integers and a positive integer X, the task is to count subsequences with GCD exactly X. Examples: Input:… Read More
Given an array arr[] consisting of N integers, the task is to find the maximum length of subarray having the Greatest Common Divisor (GCD) of… Read More
Given a 2D array arr[][] consisting of N*N positive integers, the task is to generate an N-length array such that Greatest Common Divisors(GCD) of all… Read More
Given two positive integers A and B, the task is to find the minimum number of increments/decrements required to be performed on either A or… Read More
Given two arrays a[] and b[] of length n and m respectively, the task is to find Greatest Common Divisor(GCD) of {a + b[i], a… Read More
Given two numbers A and B, the task is to find the maximum Greatest Common Divisors(GCD) that can be obtained by adding a number X… Read More
Given two arrays A[] and B[] consisting of N integers, the task is to find the maximum number of 0s in the array A[] that… Read More
Given an array arr[] consisting of N positive integers, the task is to find all the possible distinct Greatest Common Divisors(GCDs) among all the non-empty… Read More
Given an array arr[] consisting of  N integers, the task for every ith element of the array is to find the number of non co-prime… Read More
Given an array arr[] of size N and an integer K, the task is to find the maximum possible value of D, such that every… Read More
Given a positive integer N, the task is to print all the numbers, say K, such that K is a divisor of N and K… Read More
Given an integer N, the task is to count the values of K ( where 1 ≤ K≤ N ), such that 1< GCD(K, N)… Read More
Given an integer N, the task to print the count numbers from the range [1, N] whose adjacent digits are not co-prime.  Two numbers A… Read More