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).

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

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.6.0.tar.gz (96.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tryalgo-1.6.0-py3-none-any.whl (104.9 kB view details)

Uploaded Python 3

File details

Details for the file tryalgo-1.6.0.tar.gz.

File metadata

  • Download URL: tryalgo-1.6.0.tar.gz
  • Upload date:
  • Size: 96.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for tryalgo-1.6.0.tar.gz
Algorithm Hash digest
SHA256 b967a276a5c4026446cdd97e87bd8bfec4a42e0ac9f7eff3dee057f54da77425
MD5 2cac52482c31771912c7e569d2d25db9
BLAKE2b-256 eaa56553fb3860f3e4aa79abad6160d69a6618723a9e4b57d476baacc21dc6c4

See more details on using hashes here.

File details

Details for the file tryalgo-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: tryalgo-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 104.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for tryalgo-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1c7953a2d733aae6998bf100f77a3983808038e6d6ed8dc294adc3ec2b34349
MD5 1c191e75c2b7a56b312703a64c8abf84
BLAKE2b-256 cf1b131ec0b125c66a50141c389926b210f6ec20f77b0aa525d212122499eb0a

See more details on using hashes here.

Supported by

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