mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
Use correct function names in nth_fibonacci_using_matrix_exponentiation.py (#1045)
@AnupKumarPanwar @ParthS007 @poyea Could I please get a quick review on this one because I made a mistake here that breaks the build for new pull requests.
This commit is contained in:
parent
60c608d85a
commit
dc1de946ea
@ -74,7 +74,7 @@ def main():
|
||||
fmt = "{} fibonacci number using matrix exponentiation is {} and using bruteforce is {}\n"
|
||||
for ordinal in "0th 1st 2nd 3rd 10th 100th 1000th".split():
|
||||
n = int("".join(c for c in ordinal if c in "0123456789")) # 1000th --> 1000
|
||||
print(fmt.format(ordinal, nth_fibonacci(n), nth_fibonacci_test(n)))
|
||||
print(fmt.format(ordinal, nth_fibonacci_matrix(n), nth_fibonacci_bruteforce(n)))
|
||||
# from timeit import timeit
|
||||
# print(timeit("nth_fibonacci_matrix(1000000)",
|
||||
# "from main import nth_fibonacci_matrix", number=5))
|
||||
|
Loading…
Reference in New Issue
Block a user