Algorithmic Problem Solving
Algorithms and data structures for preparing programming competitions (e.g. ICPC, see more) and coding interviews.
By Christoph Dürr and Jill-Jênn Vie.
Our book is available in French, English, Simplified and Traditional Chinese.
Install
pip install tryalgo
Documentation
- Documentation of tryalgo 1.4
- Blog tryalgo.org in French and English
Demo: TryAlgo in Paris
Shortest paths on the graph of Paris.
To run it yourself:
pip install -r examples/requirements.txt
jupyter notebook # Then go to examples folder
Usage
Dynamic programming some example with coin change:
from tryalgo import coin_change
print(coin_change([3, 5, 11], 29)) # True because 29 = 6 x 3 + 0 x 5 + 1 x 11
Des chiffres et des lettres (that inspired Countdown)
from tryalgo.arithm_expr_target import arithm_expr_target
arithm_expr_target([25, 50, 75, 100, 3, 6], 952)
Returns '((((75*3)*(100+6))-50)/25)=952'.
Tests
All algorithms are thoroughly tested. These tests can be used to practice your programming skills!
python -m unittest
Most snippets from the book are within 76 columns (French version) or 75 columns (English version).
Our code is checked. Using optional requirements, you can check it too:
pip install pycodestyle pylint
make pycodestyle # PEP8
make pylint
Found a bug?
Please drop an issue.
Authors
© 2016–2023, Christoph Dürr and Jill-Jênn Vie (vie@jill-jenn.net).
Released under the MIT License.
Contributors
Thanks!
- Louis Abraham
- Lilian Besson
- Xavier Carcelle
- Stéphane Henriot
- Ryan Lahfa
- Olivier Marty
- Samuel Tardieu
Metadata
Release files for tryalgo 1.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tryalgo-1.7.0.tar.gz | 97.7 kB | Without provenance | Details for tryalgo-1.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tryalgo-1.7.0-py3-none-any.whl | Python 3 | none | any | Details for tryalgo-1.7.0-py3-none-any.whl |
Total release size: 204.3 kB
Release files / tryalgo-1.7.0.tar.gz
| Download URL | tryalgo-1.7.0.tar.gz |
|---|---|
| Size | 97.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b594bb0b04fc0fcfe497969f5f632c4577e7a60a9a2ca8756c2fcf5b3d526dc9
|
|
BLAKE2b-256 checksum How to use checksums |
7f0d97a492e2570d44f3d769b294bbe05d95408086d0946cac296e0bb34a0dc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / tryalgo-1.7.0-py3-none-any.whl
| Download URL | tryalgo-1.7.0-py3-none-any.whl |
|---|---|
| Size | 106.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
425b0b17feeef387f449aa25ab63e90e60556c9ca266cc7e961b4bc8b3c10645
|
|
BLAKE2b-256 checksum How to use checksums |
eea1fe68386037989f0afe12baf0fb25584fa65cbaeb02777762989f46c8d153
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Security for tryalgo 1.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.