Created
September 4, 2025 15:15
-
-
Save haydenk/9f086fcfce405e99cc35770a815f7abd to your computer and use it in GitHub Desktop.
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
| def fibonacci(n: int) -> int: | |
| abs_n: int = abs(n) | |
| if abs_n < 2: | |
| return 0 | |
| if abs_n < 3: | |
| return 1 | |
| return fibonacci(abs_n-1) + fibonacci(abs_n-2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment