Skip to content

used [terminology]

Terminology

Usage

  • Use for choices or resources currently unavailable.
  • Common examples include used colors, indices, characters, or cells in the current branch.
  • Unlike visited, used may represent a temporary constraint rather than permanent traversal state.
used = {colors[nei] for nei in graph[garden] if colors[nei]}

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