Python/graphs
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
..
a_star.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
articulation_points.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
basic_graphs.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
bellman_ford.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
bfs_shortest_path.py refactor 2019-05-26 21:56:10 +05:30
bfs.py #315 Renamed all files to snake_case (#993) 2019-07-11 11:16:42 +02:00
breadth_first_search.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
check_bipartite_graph_bfs.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
check_bipartite_graph_dfs.py Implement check_bipartite_graph using DFS. (#808) 2019-05-16 19:24:56 +08:00
depth_first_search.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
dfs.py #315 Renamed all files to snake_case (#993) 2019-07-11 11:16:42 +02:00
dijkstra_2.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
dijkstra_algorithm.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
dijkstra.py Added doctest and more explanation about Dijkstra execution. (#1014) 2019-07-17 01:09:53 +02:00
directed_and_undirected_(weighted)_graph.py #315 Renamed all files to snake_case (#993) 2019-07-11 11:16:42 +02:00
edmonds_karp_multiple_source_and_sink.py refactor 2019-05-26 21:56:10 +05:30
eulerian_path_and_circuit_for_undirected_graph.py #315 Renamed all files to snake_case (#993) 2019-07-11 11:16:42 +02:00
even_tree.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
finding_bridges.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
floyd_warshall.py Add docstring and comments per Issue #727 (#895) 2019-06-18 18:28:01 +08:00
graph_list.py Removed the (incorrectly named) redundant file graph_list.py and renamed graph.py to graph_list.py (#820) 2019-05-21 14:06:05 +08:00
graph_matrix.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
kahns_algorithm_long.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
kahns_algorithm_topo.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
minimum_spanning_tree_kruskal.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
minimum_spanning_tree_prims.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
multi_hueristic_astar.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
page_rank.py refactor 2019-05-26 21:56:10 +05:30
prim.py Removed Graphs and move prim.py to graphs (#872) 2019-06-05 09:37:05 +08:00
scc_kosaraju.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00
tarjans_scc.py Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (#763) 2019-04-22 22:53:56 +08:00