Commit Graph

7 Commits

Author SHA1 Message Date
William Zhang
9eac17a408 psf/black code formatting (#1277) 2019-10-05 10:14:13 +05:00
Christian Clauss
0f09530707 dijkstra.py: Use r"strings" to fix two pylint warnings (#1052)
```
=============================== warnings summary ===============================
graphs/dijkstra.py:81
  /home/travis/build/TheAlgorithms/Python/graphs/dijkstra.py:81: DeprecationWarning: invalid escape sequence \ 
    """
graphs/dijkstra.py:97
  /home/travis/build/TheAlgorithms/Python/graphs/dijkstra.py:97: DeprecationWarning: invalid escape sequence \ 
    """
-- Docs: https://docs.pytest.org/en/latest/warnings.html
=================== 126 passed, 7 warnings in 19.35 seconds ====================
```
2019-07-21 00:31:08 +08:00
Bruno Simas Hadlich
267b5eff40 Added doctest and more explanation about Dijkstra execution. (#1014)
* Added doctest and more explanation about Dijkstra execution.

* tests were not passing with python2 due to missing __init__.py file at number_theory folder

* Removed the dot at the beginning of the imported modules names because 'python3 -m doctest -v data_structures/hashing/*.py' and 'python3 -m doctest -v data_structures/stacks/*.py' were failing not finding hash_table.py and stack.py modules.

* Moved global code to main scope and added doctest for project euler problems 1 to 14.

* Added test case for negative input.

* Changed N variable to do not use end of line scape because in case there is a space after it the script will break making it much more error prone.

* Added problems description and doctests to the ones that were missing. Limited line length to 79 and executed python black over all scripts.

* Changed the way files are loaded to support pytest call.

* Added __init__.py to problems to make them modules and allow pytest execution.

* Added project_euler folder to test units execution

* Changed 'os.path.split(os.path.realpath(__file__))' to 'os.path.dirname()'
2019-07-17 01:09:53 +02:00
zachzhu2016
a212efee5b Corrected wrong Dijkstra priority queue implementation (#909)
* Corrected wrong DFS implementation

* changed list into hash set for dijkstra priority queue implementation.
2019-06-23 23:32:12 +08:00
Vysor
df04d94543 Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763)
* Renaming directories
* Adding a recursive factorial algorithm
2019-04-22 22:53:56 +08:00
Reshad Hasan
9a44eb4479 Organize graph algorithms (#719)
* organized graph algorithms

* all graph algorithms in Graphs/ folder

* all graph algorithms are in one folder

* Rename number theory/factorial_python.py to maths/factorial_python.py
2019-02-25 17:35:24 +08:00
Reshad Hasan
af08a67b20 added the dijkstra algorithm (#704) 2019-02-18 23:35:46 +08:00