All Algorithms implemented in Python the-algorithms.com/
Go to file
Dhruv 29b32d3553
Improve validate solutions script & fix pre-commit error (#3253)
* Trying to time every solution

* Proposal 2 for timing PE solutions:

- Use pytest fixture along with --capture=no flag to print out the
  top DURATIONS slowest solution at the end of the test sessions.
- Remove the print part and try ... except ... block from the test
  function.

* Proposal 3 for timing PE solutions:

Completely changed the way I was performing the tests. Instead of
parametrizing the problem numbers and expected output, I will
parametrize the solution file path.

Steps:
- Collect all the solution file paths
- Convert the paths into a Python module
- Call solution on the module
- Assert the answer with the expected results

For assertion, it was needed to convert the JSON list object to
Python dictionary object which required changing the JSON file itself.

* Add type hints for variables

* Fix whitespace in single_qubit_measure
2020-10-13 15:41:12 +05:30
.github
arithmetic_analysis
backtracking Added sudoku type hints [Hacktober Fest] (#3124) 2020-10-10 12:32:51 +05:30
bit_manipulation
blockchain
boolean_algebra
cellular_automata
ciphers
compression
computer_vision
conversions
data_structures
digital_image_processing
divide_and_conquer
dynamic_programming
file_transfer
fuzzy_logic
genetic_algorithm
geodesy
graphics
graphs
greedy_method
hashes
images
linear_algebra
machine_learning
maths Fixes: #2630 Add doctests and support for negative numbers (#2626) 2020-10-07 15:23:14 +05:30
matrix
networking_flow
neural_network
other Created max_sum_sliding_window in Python/other (#3065) 2020-10-09 17:51:04 +05:30
project_euler Improve validate solutions script & fix pre-commit error (#3253) 2020-10-13 15:41:12 +05:30
quantum Improve validate solutions script & fix pre-commit error (#3253) 2020-10-13 15:41:12 +05:30
scheduling
scripts
searches
sorts
strings Add type hints for "strings" folder (#2882) 2020-10-06 14:01:15 +05:30
traversals
web_programming
.coveragerc
.gitignore
.gitpod.yml
.pre-commit-config.yaml
.travis.yml
CONTRIBUTING.md
DIRECTORY.md
LICENSE.md
pytest.ini
README.md
requirements.txt
Travis_CI_tests_are_failing.md

The Algorithms - Python

Gitpod Ready-to-Code Gitter chat  Build Status  LGTM  contributions welcome  Donate    pre-commit code style: black

All algorithms implemented in Python (for education)

These implementations are for learning purposes only. Therefore 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.