Write a Python script /app/toposort.py that reads a dependency specification from stdin and outputs a…
Write a Python script /app/toposort.py that reads a dependency specification from stdin and outputs a…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format (stdin): - A JSON object with exactly one key "nodes" . - "nodes" is an object mapping each node…
The task
**Input format (stdin):** - A JSON object with exactly one key `"nodes"`. - `"nodes"` is an object mapping each node name (string) to an object with an optional key `"depends"`. - `"depends"`, if present, is a list of node name strings that this node directly depends on. - Node names are non-empty UTF-8 strings, may…
Part of ai-and/termgrade-environments.