Grokking the Art of Recursion for Coding Interviews
Vote

0% completed

​

3. Greatest Common Divisor (GCD)

Problem Statement

Write recursive code to calculate the Greatest Common Divisor (GCD) of Two Positive Numbers.

The greatest common divisor (GCD) of two positive integers A and B is the largest positive integer that divides both A and B without leaving a remainder.

Let's see some example inputs/outputs for this example:

| <span style="white-space:nowrap">Input(s</span>) | <span style="white-space:nowrap">Output(s</span>) | Explanation |

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content