black fixes and Travis CI fixes (#2160)

* black format

* updating DIRECTORY.md

* fixes

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
vinayak
2020-07-02 20:02:15 +05:30
committed by GitHub
parent c534e77cb1
commit 2d3d660155
7 changed files with 11 additions and 43 deletions

View File

@@ -5,24 +5,9 @@ Finding connected components in graph
"""
test_graph_1 = {
0: [1, 2],
1: [0, 3],
2: [0],
3: [1],
4: [5, 6],
5: [4, 6],
6: [4, 5],
}
test_graph_1 = {0: [1, 2], 1: [0, 3], 2: [0], 3: [1], 4: [5, 6], 5: [4, 6], 6: [4, 5]}
test_graph_2 = {
0: [1, 2, 3],
1: [0, 3],
2: [0],
3: [0, 1],
4: [],
5: [],
}
test_graph_2 = {0: [1, 2, 3], 1: [0, 3], 2: [0], 3: [0, 1], 4: [], 5: []}
def dfs(graph: dict, vert: int, visited: list) -> list:

View File

@@ -5,22 +5,9 @@ Finding strongly connected components in directed graph
"""
test_graph_1 = {
0: [2, 3],
1: [0],
2: [1],
3: [4],
4: [],
}
test_graph_1 = {0: [2, 3], 1: [0], 2: [1], 3: [4], 4: []}
test_graph_2 = {
0: [1, 2, 3],
1: [2],
2: [0],
3: [4],
4: [5],
5: [3],
}
test_graph_2 = {0: [1, 2, 3], 1: [2], 2: [0], 3: [4], 4: [5], 5: [3]}
def topology_sort(graph: dict, vert: int, visited: list) -> list: