HF RL Explorer

Write a command-line tool that reads a dependency graph from stdin and outputs a topological ordering (one…

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

The task

Input format (stdin): one edge per line, format "A -> B" meaning A depends on B (B must come before A in output). Node names are non-empty strings of printable ASCII characters (codes 32-126) excluding spaces and "->". Lines may have leading/trailing whitespace. Empty lines and lines containing only whitespace must…

Part of ai-and/termgrade-environments.