Live Demo → coming soon
A study‑driven playground where classic data‑structures & algorithms come to life through bite‑sized Python implementations and interactive Streamlit visuals. Learn, iterate, and share—while your résumé quietly levels‑up.
Category | What you get |
---|---|
Algorithms | Sorting (Bubble, Insertion, Merge, Quick, Heap) • Graph (BFS, DFS, Dijkstra) • Dynamic Programming (LCS, Knapsack) |
Visuals | Auto‑play animations or slider‑scrub frames rendered in Streamlit—no JavaScript required |
Clean Code | Each algorithm ≤ 50 LOC, type‑hinted, pep8‑formatted, with complexity docs |
Unit Tests | pytest + GitHub Actions CI keep every refactor safe |
Benchmarks | Tiny timing harness to compare implementations |
Container Ready | Single Dockerfile + optional docker‑compose.yml (PostgreSQL/Redis examples) |
AWS Samples | IaC snippets for App Runner, ECS Fargate (Compose CLI), and Elastic Beanstalk |
# clone + install dev deps
$ git clone https://github.com/<you>/algorithms-in-action.git
$ cd algorithms-in-action
$ pip install -r requirements.txt
# run the app
$ streamlit run streamlit_app.py
# http://localhost:8501
Or fire up Docker:
$ docker compose up --build # http://localhost:8501
algorithms-in-action/
├─ algorithms/
│ ├─ sorting/
│ │ ├─ merge_sort.py
│ │ └─ tests/
│ └─ graphs/
│ └─ dijkstra.py
├─ viz/ # Streamlit front‑end
│ └─ streamlit_app.py
├─ benchmarks/
├─ Dockerfile
├─ docker-compose.yml
├─ .github/workflows/ci.yml
└─ README.md
- Push the repo to GitHub (public).
- Go to streamlit.io/cloud → New app → select repo/branch.
- Set
main file = viz/streamlit_app.py
→ Deploy.
- Fork the repo to a private or public GitHub.
- App Runner console → Create service → Source code.
- Expose port 8501; autopilot build.
More options (ECS Fargate via Docker‑Compose, Elastic Beanstalk) inside aws/
.
Group | Algorithms | Status |
---|---|---|
Sorting | Bubble, Selection, Insertion, Merge, Quick, Heap | ✅ |
Graphs | BFS, DFS, Dijkstra, Topological Sort | ✅ |
Dynamic Programming | Fibonacci (memo/tab), LCS, 0‑1 Knapsack | 🚧 |
Misc. | Binary Search, Union‑Find | ✅ |
Check the Projects board for the current roadmap.
- Fork & clone the repo.
- Create a new branch:
git checkout -b feat/your‑awesome‑algo
. - Add code + unit tests (
pytest -q
). - Run
pre‑commit run --all-files
. - Open a PR 🙂.
Please avoid posting verbatim premium problem statements—paraphrase or link.
Released under the MIT License—see LICENSE
for details.
- Inspired by VisuAlgo, AlgoExpert, and countless open‑source contributors.
- Streamlit logo © Streamlit Inc.; used per Apache 2.0 license.
Built with ❤️ by Mahdi Ashrafee — feedback & stars welcome!