Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 405 Bytes

File metadata and controls

12 lines (9 loc) · 405 Bytes

Problem 17: The Greatest Divider (GCD using Recursion)

Problem Statement

Given two positive integers a and b, find their Greatest Common Divisor (GCD) using the Euclidean algorithm implemented recursively.

Input Format

  • Two positive integers a and b.

Example

Input: a = 48, b = 18
Output: 6
Explanation: GCD(48, 18) → GCD(18, 12) → GCD(12, 6) → GCD(6, 0) = 6.