Skip to content

Commit 152c0c0

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d0909dc commit 152c0c0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

backtracking/m-coloring-problem.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ def isSafe(node, color, graph, n, col):
44
return False
55
return True
66

7+
78
def solve(node, col, m, n, graph):
89
if node == n:
910
return True
@@ -15,12 +16,14 @@ def solve(node, col, m, n, graph):
1516
col[node] = 0
1617
return False
1718

19+
1820
def graphColoring(graph, m, n):
1921
col = [0] * n
2022
if solve(0, col, m, n, graph):
2123
return True
2224
return False
2325

26+
2427
if __name__ == "__main__":
2528
V = int(input())
2629
E = int(input())

0 commit comments

Comments
 (0)