Challenge: Greatest Common Divisor

Solve the Greatest Common Divisor Problem.

We'll cover the following

Problem


Greatest Common Divisor Problem

Compute the greatest common divisor of two positive integers.

Input: Two positive integers aa and bb.

Output: The greatest common divisor of aa and bb.


Level up your interview prep. Join Educative to access 70+ hands-on prep courses.