Write a command-line tool /app/toposort (Python script) that reads a directed dependency graph from a text…
Write a command-line tool /app/toposort (Python script) that reads a directed dependency graph from a text…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input file format: - One dependency per line: A - B means "A depends on B" (B must come before A). - Lines…
The task
**Input file format:** - One dependency per line: `A -> B` means "A depends on B" (B must come before A). - Lines can be separated by LF or CRLF. - A line may have trailing whitespace; the arrow is always exactly ` -> ` (space, dash, dash, greater-than, space). - Node names are non-empty strings of printable ASCII…
Part of ai-and/termgrade-environments.