This repository contains implementations of algorithms from the book "Grokking Algorithms" by Aditya Bhargava, along with corresponding unit tests.
-
Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh
-
Clone the repository:
git clone https://github.com/helioLJ/grokking-algorithms-implementation.git cd grokking-algorithms-implementation
-
Install project dependencies:
uv sync
If you want to generate template files from the existing implementations:
- Ensure you have committed any changes you want to keep.
- Run the template generation script:
uv run python scripts/generate_templates.py
To run all tests:
uv run pytest
To run tests for a specific chapter, navigate to the chapter directory and run:
uv run pytest tests/test_chapterX
- Fork the repository
- Create a new branch for your feature
- Implement your changes and add tests if necessary
- Submit a pull request
- Aditya Bhargava for the book "Grokking Algorithms"
- All contributors to this project