Skip to main content

Algorithms and data structures for preparing programming competitions

Project description

PyPI PyPI Pylint score Codecov

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

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, to be released soon).

Our code is checked:

make pycodestyle  # PEP8
make pylint

Found a bug?

Please drop an issue.

Authors

© 2016–2022, 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tryalgo-1.4.0.tar.gz (65.2 kB view hashes)

Uploaded Source

Built Distribution

tryalgo-1.4.0-py3-none-any.whl (93.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page