Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heliolj/grokking-algorithms-implementation
This repository contains implementations of algorithms from the book "Grokking Algorithms" by Aditya Bhargava, along with corresponding unit tests.
https://github.com/heliolj/grokking-algorithms-implementation
grokking-algorithms
Last synced: about 2 months ago
JSON representation
This repository contains implementations of algorithms from the book "Grokking Algorithms" by Aditya Bhargava, along with corresponding unit tests.
- Host: GitHub
- URL: https://github.com/heliolj/grokking-algorithms-implementation
- Owner: helioLJ
- Created: 2024-09-10T12:15:59.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-17T15:26:51.000Z (4 months ago)
- Last Synced: 2024-09-17T23:27:38.369Z (4 months ago)
- Topics: grokking-algorithms
- Language: Python
- Homepage:
- Size: 256 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Grokking Algorithms Implementation
This repository contains implementations of algorithms from the book "Grokking Algorithms" by Aditya Bhargava, along with corresponding unit tests.
## Getting Started
1. Install uv (if not already installed):
```
curl -LsSf https://astral.sh/uv/install.sh | sh
```2. Clone the repository:
```
git clone https://github.com/helioLJ/grokking-algorithms-implementation.git
cd grokking-algorithms-implementation
```3. Install project dependencies:
```
uv sync
```## Implementing Algorithms
If you want to generate template files from the existing implementations:
1. Ensure you have committed any changes you want to keep.
2. Run the template generation script:
```
uv run python scripts/generate_templates.py
```## Running Tests
To run all tests:
```
uv run pytest
```![Pytest](grokking-algorithms-pytest.gif)
To run tests for a specific chapter, navigate to the chapter directory and run:
```python
uv run pytest tests/test_chapterX
```## Contributing
1. Fork the repository
2. Create a new branch for your feature
3. Implement your changes and add tests if necessary
4. Submit a pull request## Acknowledgments
- Aditya Bhargava for the book "Grokking Algorithms"
- All contributors to this project