Skip to content

colors [terminology]

Terminology

Usage

  • Use for the per-item color assignments in graph coloring.
  • It is more semantic than res or ans.
  • Use singular color for one candidate color and plural colors for all assignments.
colors = [0] * n

for color in range(1, 5):
    if color not in used:
        colors[garden] = color