Write a command-line tool that reads a dependency graph from stdin and outputs either a valid topological…
Write a command-line tool that reads a dependency graph from stdin and outputs either a valid topological…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format (stdin): Each line represents one directed edge: A - B meaning "A must come before B". - Lines…
The task
**Input format** (stdin): Each line represents one directed edge: `A -> B` meaning "A must come before B". - Lines may be separated by LF or CRLF. - A line may have arbitrary whitespace around the arrow and the nodes. - Empty lines and lines containing only whitespace must be silently ignored. - Lines starting with…
Part of ai-and/termgrade-environments.