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:
cclauss 2019-07-19 10:55:45 +02:00 committed by John Law
parent 60c608d85a
commit dc1de946ea

View File

@ -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))