Write a command-line tool at /app/toposort that reads a dependency specification from stdin and outputs…
Write a command-line tool at /app/toposort that reads a dependency specification from stdin and outputs…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input contract (stdin): - One line per dependency, format: A - B meaning "A depends on B" (B must come before…
The task
**Input contract (stdin):** - One line per dependency, format: `A -> B` meaning "A depends on B" (B must come before A). - Node names are non‑empty strings of printable ASCII characters (no spaces, no tabs, no `->`). - Lines may have leading/trailing whitespace (spaces, tabs). - Empty lines and lines containing only…
Part of ai-and/termgrade-environments.