From 92449bfb32a6c7ea59ec2028114d23b98b5cbf64 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:08:59 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- backtracking/coloring.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backtracking/coloring.py b/backtracking/coloring.py index e0d3c9e52..8412ee3be 100644 --- a/backtracking/coloring.py +++ b/backtracking/coloring.py @@ -1,6 +1,6 @@ """ -Graph Coloring (also called the "m coloring problem") is the problem of -assigning at most 'm' colors to the vertices of a graph such that +Graph Coloring (also called the "m coloring problem") is the problem of +assigning at most 'm' colors to the vertices of a graph such that no two adjacent vertices share the same color. Wikipedia: https://en.wikipedia.org/wiki/Graph_coloring @@ -119,7 +119,7 @@ def util_color( def color(graph: list[list[int]], max_colors: int) -> list[int]: """ - Attempts to color the graph with at most max_colors colors such that no two adjacent + Attempts to color the graph with at most max_colors colors such that no two adjacent vertices have the same color. If it is possible, returns the list of color assignments; otherwise, returns an empty list.