HF RL Explorer

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

Write a command-line tool toposort that reads a dependency graph from stdin and outputs either a valid…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format (stdin, UTF-8): - One line per node, format: NODE:DEP1,DEP2,DEP3,... - NODE is a non-empty string…

The task

**Input format** (stdin, UTF-8): - One line per node, format: `NODE:DEP1,DEP2,DEP3,...` - NODE is a non-empty string of printable ASCII (no colons, no commas, no whitespace) - Dependencies are comma-separated (may be empty, meaning no dependencies) - Lines may arrive in any order - Input may contain blank lines…

Part of ai-and/termgrade-environments.