mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
Update backtracking/coloring.py
Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
parent
9da28b0ccc
commit
42c32e7c4e
|
@ -125,7 +125,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
|
||||
Attempt 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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user