Let’s now see how much time the previous function takes to execute. In a Jupyter Notebook or any language interpreter, you can use the following script to find the time taken by the algorithm.

JAVASCRIPT
OUTPUT
Results will appear here.