File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ def color(graph: list[list[int]], max_colors: int) -> list[int]:
112112
113113 return []
114114
115+
115116if __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." )
You can’t perform that action at this time.
0 commit comments