Skip to content

Commit 3299e80

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 54f920c commit 3299e80

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

backtracking/coloring.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ def color(graph: list[list[int]], max_colors: int) -> list[int]:
112112

113113
return []
114114

115+
115116
if __name__ == "__main__":
116117
# Example graph represented as an adjacency matrix
117118
graph_example = [
@@ -125,6 +126,8 @@ def color(graph: list[list[int]], max_colors: int) -> list[int]:
125126
max_colors_example = 3
126127
coloring_result = color(graph_example, max_colors_example)
127128
if coloring_result:
128-
print(f"Graph can be colored with {max_colors_example} colors: {coloring_result}")
129+
print(
130+
f"Graph can be colored with {max_colors_example} colors: {coloring_result}"
131+
)
129132
else:
130-
print(f"Graph cannot be colored with {max_colors_example} colors.")
133+
print(f"Graph cannot be colored with {max_colors_example} colors.")

0 commit comments

Comments
 (0)