HF RL Explorer

Write a command-line tool /app/topsort (Python script) that reads a dependency specification from stdin and…

Write a command-line tool /app/topsort (Python script) that reads a dependency specification from stdin and…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format (stdin): - One dependency per line: A - B meaning "A depends on B" (B must come before A in…

The task

**Input format (stdin):** - One dependency per line: `A -> B` meaning "A depends on B" (B must come before A in the ordering). - Node names are non-empty strings of printable ASCII characters (no tabs, no spaces inside a name). Names are case-sensitive. - Lines may have trailing whitespace. - Blank lines (empty or…

Part of ai-and/termgrade-environments.