All Algorithms implemented in Python the-algorithms.com/
Go to file
Du Yuanchao 34294b5641
Update sum_of_digits.py (#2319)
* * support negative number
* add different version

* fixup! Format Python code with psf/black push

* sum(int(c) for c in str(abs(n)))

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-08-16 20:31:06 +02:00
.github isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
arithmetic_analysis Fixed bug with incorrect LU decomposition (#2261) 2020-08-01 22:11:39 +02:00
backtracking N queens math (#2175) 2020-07-10 10:30:48 +02:00
bit_manipulation Create Python/bit_manipulation/README.md (#1897) 2020-04-20 20:19:27 +02:00
blockchain Set the Python file maximum line length to 88 characters (#2122) 2020-06-16 10:09:19 +02:00
boolean_algebra Tabs --> spaces in quine_mc_cluskey.py (#1426) 2019-11-21 22:21:40 +08:00
cellular_automata Blacken one_dimensional.py (#1911) 2020-04-27 18:40:46 +02:00
ciphers isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
compression isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
computer_vision isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
conversions initial commit of prefix-conversions (#2243) 2020-07-29 00:11:16 +02:00
data_structures fix number_of_digits bug (#2301) 2020-08-12 18:32:35 +02:00
digital_image_processing isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
divide_and_conquer Fix long line, tests (#2123) 2020-06-16 14:29:13 +02:00
dynamic_programming fixed error in factorial.py (#1888) 2020-08-05 13:18:41 +02:00
file_transfer Create codespell.yml (#1698) 2020-01-18 13:24:33 +01:00
fuzzy_logic isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
genetic_algorithm Add a missing "genetic algorithm" folder with a basic algorithm inside (#2179) 2020-07-07 12:46:09 +02:00
geodesy isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
graphics isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
graphs Added Kruskal's Algorithm (more organized than the one present) (#2218) 2020-08-12 12:16:17 +02:00
greedy_method isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
hashes isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
images Add Travis_CI_tests_are_failing.md (#1499) 2019-10-28 13:38:08 +01:00
linear_algebra Create Transformations2D.py (#2310) 2020-08-15 18:19:33 +02:00
machine_learning Added Normalization and Standardization Algorithms (#2192) 2020-07-10 15:36:51 +02:00
maths Update sum_of_digits.py (#2319) 2020-08-16 20:31:06 +02:00
matrix Added "Inverse of Matrix" Algorithm (#2209) 2020-07-23 13:18:17 +02:00
networking_flow Tighten up psf/black and flake8 (#2024) 2020-05-22 08:10:11 +02:00
neural_network isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
other requirements.txt: Unpin numpy (#2287) 2020-08-06 17:50:23 +02:00
project_euler Created problem_35 in project_euler (#2309) 2020-08-16 07:52:48 +02:00
quantum Update README.md (#1842) 2020-04-07 23:56:21 +02:00
scheduling isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
scripts isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
searches fix doctests for recursive binary search (#2229) 2020-08-01 07:26:04 +02:00
sorts Gnome sort : type hints, docstrings, doctests (#2307) 2020-08-14 22:00:08 +02:00
strings Implement prefix function, knuth-morris-pratt another usage (#2099) 2020-06-17 18:27:05 +02:00
traversals Tighten up psf/black and flake8 (#2024) 2020-05-22 08:10:11 +02:00
web_programming requirements.txt: Unpin numpy (#2287) 2020-08-06 17:50:23 +02:00
.coveragerc Add pytest-cov (#1578) 2019-11-17 19:37:58 +01:00
.gitignore contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
.gitpod.yml Change gitpod configuration for python3. (#1827) 2020-04-07 12:20:08 +02:00
.travis.yml Set the Python file maximum line length to 88 characters (#2122) 2020-06-16 10:09:19 +02:00
CONTRIBUTING.md CONTRIBUTING.md: Update flake8 command (#2124) 2020-06-16 16:33:17 +02:00
DIRECTORY.md Update sum_of_digits.py (#2319) 2020-08-16 20:31:06 +02:00
LICENSE.md Update year in LICENSE.md (#1848) 2020-04-13 02:17:29 +02:00
natural_language_processing Create natural_language_processing (#2116) 2020-06-15 09:55:41 +02:00
pytest.ini Add pytest init file to define custom mark mat_ops (#2120) 2020-06-15 18:09:32 +02:00
README.md Fix psf/black issues than fail the build (#1935) 2020-05-03 23:58:44 +02:00
requirements.txt requirements.txt: Unpin numpy (#2287) 2020-08-06 17:50:23 +02:00
Travis_CI_tests_are_failing.md Add Travis_CI_tests_are_failing.md (#1499) 2019-10-28 13:38:08 +01:00

The Algorithms - Python

Gitpod Ready-to-Code Gitter chat  Build Status  LGTM  contributions welcome  Donate   

All algorithms implemented in Python (for education)

These implementations are for learning purposes. They may be less efficient than the implementations in the Python standard library.

Contribution Guidelines

Read our Contribution Guidelines before you contribute.

Community Channel

We're on Gitter! Please join us.

List of Algorithms

See our directory.