Created
November 12, 2025 16:34
-
-
Save orez-/246565d6c25b88578be98a7bebb19eef to your computer and use it in GitHub Desktop.
Sick of looking up GCD algo and translating to Rust
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn gcd(a: i32, b: i32) -> i32 { | |
| if b == 0 { | |
| return a; | |
| } | |
| gcd(b, a % b) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment