Algorithms and data structures for preparing programming competitions (e.g. ACM-ICPC, see more) and coding interviews.
By Christoph Dürr and Jill-Jênn Vie.
pip install tryalgo
- Documentation of tryalgo 1.3
- 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
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'
.
All algorithms are 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, to be released soon).
We follow PEP8 (pycodestyle
):
make pycodestyle
Thanks to Xavier Carcelle, we are also following pylint
:
make pylint
As of November 24, 2019, our pylint score is 10/10.
Please drop an issue.
© 2016–2019, Christoph Dürr and Jill-Jênn Vie ([email protected]).
Released under the MIT License.
Thanks!
- Louis Abraham
- Lilian Besson
- Xavier Carcelle
- Stéphane Henriot
- Ryan Lahfa
- Olivier Marty
- Samuel Tardieu