Algorithms and data structures implemented in Python. Here you'll find:
- Implementations of algorithms and data structures
- Solutions for problems, prompts, challenges, and popular interview questions
With poetry:
# Get repository
git clone https://github.com/JCPedroza/algorithms-and-data-structures-py.git
cd algorithms-and-data-strcutrues-py
# Install dependencies in local virtual environment
poetry install # Without a dot as argument
# Create project directory
mkdir algos-and-data # Need a dir for env files
cd algos-and-data
# Create and activate local virtual environment
python -m venv venv-algos-and-data # Create local virtual environment
source venv-ads/bin/activate # Activate local virtual environment
# Get repository
git clone https://github.com/JCPedroza/algorithms-and-data-structures-py.git
cd algorithms-and-data-strcutrues-py
# Install dependencies in local virtual environment
python -m pip install . # The dot is required
With poetry:
poetry run pytest # Run al unit tests using local virtual environment
With the local virtual environment activated:
python -m pytest # With or without dot as argument
poetry run <command> # Run command inside local virtual environment
poetry shell # Activate shell inside local virtual environment
poetry check # Validate structure of pyproject.toml
-
Package manager
-
Unit testing
-
Static type check
- pyright
- mypy
-
Style, linting, formatting
Found a bug, typo, or mistake? Want to refactor, optimize, or improve something in this repository? Send a pull request! Pull requests are always welcome!
There's no need to create an issue. Just use a descriptive commit message and I'll format it adequately when accepting the pull request. Contributing here is as simple as commiting your changes and sending a pull request!