Write a Python script /app/toposort.py that reads a directed graph from a file and outputs a topological…
Write a Python script /app/toposort.py that reads a directed graph from a file and outputs a topological…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format : The script receives one command-line argument: the path to a text file. The file contains zero…
The task
**Input format**: The script receives one command-line argument: the path to a text file. The file contains zero or more edges, one per line. Each line is `U -> V` where `U` and `V` are node labels. Node labels are non-empty strings of printable ASCII characters (codepoints 32-126) excluding `>`, `"`, `'`, and…
Part of ai-and/termgrade-environments.