Implement prototype(allowed: list[list[str]]) -> list[str] | None and solve with the same signature. Choose one string per inner list, using no string twice. Return the lexicographically smallest complete assignment in input-position order, or None if impossible. Duplicate choices within one list add no alternatives. Matching and ordering use Python strings exactly.

Examples: [['A','B'], ['A']] returns ['B','A']; [['A'], ['A']] returns None; [] returns []; [[]] returns None.

Prototype: enumerate complete combinations. Final: search sorted unique options with early rejection and rollback. Preserve every input list. No additional validation errors are required; worst-case work remains exponential.

Drag or use the arrow keys to resize. Home collapses the question; End collapses the editor. Enter or double-click resets the split.
Loading editor…
No results yet.

Complete the starter code, then run the checks.
Results and errors will appear here.