مجموعهای از مسائل الگوریتمی از سطح مبتدی تا پیشرفته — همراه با پیادهسازی راهحل در پایتون.
A collection of algorithm exercises from beginner to advanced, with Python solutions.
Browse online: amirmahdikahdouii.github.io/Python-Exercises
Python-Exercises/
├── catalog/problems.yaml # metadata: category, difficulty, tags
├── problems/
│ ├── 001-count-n-digit-primes/
│ │ ├── README.md # problem statement (Persian)
│ │ └── solution.py
│ └── ...
├── scripts/
│ ├── migrate.py
│ └── generate_hugo_content.py
└── .github/workflows/deploy-website.yml
Each problem lives in problems/NNN-slug/ where NNN is the original question number (Q-1 → 001).
- Clone this repository.
- Browse problems on the website or in
catalog/problems.yaml. - Open a problem's
README.mdand implement your own solution. - Compare with
solution.py(orsolution.gofor problem #85).
Problems are tagged by topic and difficulty in catalog/problems.yaml:
| Category | Examples |
|---|---|
| math | primes, divisors, palindromes |
| strings | ciphers, digit manipulation |
| arrays | statistics, merging, filtering |
| search | binary search variants |
| sorting | bubble sort, bead sort |
| dp | knapsack, fibonacci |
| greedy | stock profit, book buying |
| crypto | Caesar cipher, OTP |
| simulation | elevator, games |
| combinatorics | subsets, combinations |
| data-structures | sets, frequency maps |
| graphs | parity, grid problems |
| io | Go reader exercise (#85) |
The Hugo site (PaperMod theme) lives on the website branch. Pushing to master or website triggers automatic deployment to GitHub Pages.
To add a new problem:
- Create
problems/NNN-your-slug/withREADME.mdandsolution.py. - Add an entry to
catalog/problems.yaml. - Push to
master— the site rebuilds automatically.
Questions or collaboration: Telegram