Skip to content
Prev Previous commit
Next Next commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 15, 2023
commit 42c40d76e77a7999436ad28ce1a0f9dfcd529c31
1 change: 1 addition & 0 deletions dynamic_programming/matrix_chain_multiplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def a(i, j):
def elapsed_time(msg: str) -> None:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As there is no test file in this pull request nor any test function or class in the file dynamic_programming/matrix_chain_multiplication.py, please provide doctest for the function elapsed_time

# print(f"Starting: {msg}")
from time import perf_counter_ns

start = perf_counter_ns()
yield
print(f"Finished: {msg} in {(perf_counter_ns() - start) / 10 ** 9} seconds.")
Expand Down