/algorithms-and-data-structures-py

Algorithms and data structures implemented in Python.

Primary LanguagePythonMIT LicenseMIT

Python Algorithms & Data Structures

python license MIT linux build & tests codeql

style black lint: flake8 test: pytest codacy code quality codefactor code quality

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

Installation

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

With venv and pip:

# 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

Unit Testing

With poetry:

poetry run pytest  # Run al unit tests using local virtual environment

With venv and pip:

With the local virtual environment activated:

python -m pytest  # With or without dot as argument

Important Poetry Commands

poetry run <command>  # Run command inside local virtual environment
poetry shell          # Activate shell inside local virtual environment
poetry check          # Validate structure of pyproject.toml

Toolchain Overview

Contributing

contributors commit activity issues issues closed issues pr issues pr closed

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!


code size repo size