Find the greatest common divisor of two integers using the Euclidean algorithm.
Examples
Example 1
Input: a = 12, b = 8
Output: 4
Divisors of 12: [1,2,3,4,6,12], Divisors of 8: [1,2,4,8], GCD = 4
Example 2
Input: a = 15, b = 25
Output: 5
Example 3
Input: a = 0, b = 42
Output: 42
Constraints
- -10⁹ ≤ a, b ≤ 10⁹
- Handle negative numbers and zero cases
- GCD is always positive