Tag Archives: HCF

Given three positive integers, P, Q and N, the task is to find the GCD of (PN + QN) and (P – Q) under modulo… Read More
Given an array arr[] of size N, the task is to check if it is possible to split the array arr[] into different subsequences of… Read More
Given two integers X and Y, the task is to find the number of integers, K, such that gcd(X, Y) is equal to gcd(X+K, Y),… Read More
Given an array arr[] of size N, the task is to find the minimum count of elements required to be inserted into the array such… Read More
Given an array arr[] consisting of a permutation of first N natural numbers, the task is to find the maximum possible value of ΣGCD(arr[i], i)… Read More
Given an array arr[] of size N, the task is to find the winner of the game when two players play the game optimally as… Read More
Given an integer N (N &e; 3), the task is to split all numbers from 1 to N into two subsequences such that the sum… Read More
Given an integer N and an array arr[], the task is to check if a sequence of first N natural numbers, i.e. {1, 2, 3,… Read More
Given a positive integer N, the task is to construct an array consisting of first N natural numbers such that each pair of adjacent elements… 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 an array arr[] of size N, the task is to print the minimum count of equal length subsets the array can be partitioned into… Read More
Given an array, arr[] of size N, the task is to count the number of ways to split given array elements into two subarrays such… Read More
Given an array arr[] consisting of N integers, the task is to find the maximum index K such that the product of subarrays {arr[0], arr[K]}… Read More
Given integers N, K, A, and B, check if it is possible to reach B from A in a circular queue of integers from 1… Read More
Given two positive integers X and Y, the task is to check if it is possible to reach (X, Y) from (1, 0) by the… Read More