## Program to find GCD or HCF of two numbers using Middle School Procedure

Given two positive integers M and N, the task is to find the greatest common divisor (GCD) using Middle School Procedure. Note: GCD of two… Read More »

Given two positive integers M and N, the task is to find the greatest common divisor (GCD) using Middle School Procedure. Note: GCD of two… Read More »

Given a number N. The task is to find the number of unordered coprime pairs of integers from 1 to N. There can be multiple… Read More »

Given values of A and B, find the minimum positive integer value of X that can be achieved in the equation X = P*A +… Read More »

Given two numbers A and B where 1 <= A <= B. The task is to count the number of pairs whose elements are co-prime… Read More »

Round 1:Aptitude test Contains a list of 40 Math questions, 20 English question, 20 Logical Aptitude questions. Level of question was moderate. Round 2: Asked… Read More »

HCF (Highest Common Factor) or GCD (Greatest Common Divisor) of two numbers is the largest number that divides both of them. For example GCD of… Read More »

Question problem states that find gcd() of two numbers out of which one number can be as big as (10^9)^(10^9) which cannot be stored in… Read More »

Given an integer N, find and show the number of pairs which satisfies the following conditions: Square of distance between those two numbers is equal… Read More »

Given a function gcd(a, b) to find GCD (Greatest Common Divisor) of two number. It is also known that GCD of three elements can be… Read More »

Given a rectangle of sides m and n. Cut the rectangle into smaller identical pieces such that each piece is a square having maximum possible… Read More »

Finding LCM using GCD is explained here but here the task is to find LCM without first calculating GCD. Examples: Input: 7, 5 Output: 35… Read More »

Consider two cars A and B, running infinitely (either clockwise or anti-clockwise) on a circular road. Given the speed of both the cars a and… Read More »

Given two large numbers ‘a’ and ‘b’ such that(10^20<=a, b<=10^300). Find the LCM of two large numbers given. Examples: Input: a = 234516789234023485693020129 b =… Read More »

Given two positive integer a and b and a range [low, high]. The task is to find the gretest common divisor of a and b… Read More »

We are given an array of positive integers and an integer k. Find the maximum possible GCD of a sub sequence of size k. Examples:… Read More »