Standard algorithms implemented in Python.