Given an array arr[] of N integers, the task is to find an integer X such that the integers that are divisible by X and the integers that are not divisible by X are alternative to each other in the array. If there is no such value print -1....
Given an array arr[] of n numbers and an integer k, find length of the minimum sub-array with gcd equals to k.Example:...
Given an array arr[] of size N. For each divisor of N, divide the array into N/K subarrays, each of length K. Your task is to determine how many distinct values of K exist such that there is a positive integer M (where M >= 2) that, if we replace each arr[i] with arr[i] MOD K, all the subarrays become identical....
Given an array arr[] of N integers and a positive integer K, the task is to check if it is possible to split this array into distinct contiguous subarrays such that the Greatest Common Divisor of all elements of each subarray is greater than K....
Given an array of n non-negative integers. Find such element in the array, that all array elements are divisible by it....
Given integers k, d1, d2 and an integer array arr[]. Starting from number k you are allowed to make jumps of size d1 and d2 i.e. all the possible moves from k are:...
Given an array arr[] of length N ? 2. The task is to remove an element from the given array such that the LCM of the array after removing it is minimized.Examples:...
Given an integer N, the task is to count all pairs of divisors of N such that the sum of each pair is coprime with N.Examples:...
Given an array arr[], the task is to find the count of sub-arrays with GCD equal to 1.Examples:...
Given a number, we need to find LCM of the factorial of the numbers and its neighbors. If the number is N, we need to find LCM of (N-1)!, N! and (N+1)!.Here N is always greater than or equal too 1Examples :...
Given a fraction series. Find the H.C.F of a given fraction series....
Given two positive integers K and X, the task is to find the minimum possible sum of K positive integers ( repetitions allowed ) having LCM X....