HF RL Explorer

Write a command-line tool toposort that reads a dependency specification from stdin and outputs a valid…

Write a command-line tool toposort that reads a dependency specification from stdin and outputs a valid…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format (stdin): One edge per line. Each line is A - B meaning "A depends on B" (B must come before A in…

The task

**Input format (stdin):** One edge per line. Each line is `A -> B` meaning "A depends on B" (B must come before A in the output ordering). Whitespace trimming: lines may have leading/trailing spaces, and there may be empty lines (skip them). The arrow is literally the two characters `->`. Node names are non-empty…

Part of ai-and/termgrade-environments.