Created
September 6, 2020 13:02
-
-
Save Sadamingh/0edb6f71040bbb8f286591742313a1f5 to your computer and use it in GitHub Desktop.
This file contains 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 fib(n: int) -> List[int]: | |
fib_seq = [0, 1] | |
while len(fib_seq) < n: | |
fib_seq.append(sum(fib_seq[-2:])) | |
return fib_seq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment