/big-O-python

An exploration of time complexity of Python functions

Primary LanguagePythonMIT LicenseMIT

big-O-python

This project assesses the time complexity of various built in Python functions. The program will display a plot of the time to run a function vs the size of the input, and compares that against some common Big O approximate times. The common times are O(n2), O(n * log(n)), O(n), and O(log(n)).

python3 main.py count


Contents: Installation | Use | Example Output |


made-with-python pre-commit Code style: black

Installation

pip3 install -r requirements.txt

Use

python3 main.py <function or module to assess>

The program will accept either an individual function to assess or a collection of functions as organized in funcs/

Example Output

Time complexity of str.count()