remove gcd recursive step

This commit is contained in:
Josh Deprez 2021-09-28 15:10:51 +10:00
parent cdc1bf25fc
commit 3a5a150351

View file

@ -93,7 +93,7 @@ func abs(n int) int {
func gcd(a, b int) int { func gcd(a, b int) int {
if a < b { if a < b {
return gcd(b, a) a, b = b, a
} }
for b != 0 { for b != 0 {
a, b = b, a%b a, b = b, a%b