HF RL Explorer

Write a Python script that reads a directed acyclic graph (DAG) from a JSON file and produces a topological…

Write a Python script that reads a directed acyclic graph (DAG) from a JSON file and produces a topological…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input JSON format: json { "nodes": "A", "B", "C" , "edges": "A","B" , "B","C" } - nodes is an array of…

The task

**Input JSON format:** ```json { "nodes": ["A", "B", "C"], "edges": [["A","B"], ["B","C"]] } ``` - `nodes` is an array of unique string identifiers (may contain any Unicode characters, may be empty). - `edges` is an array of `[from, to]` pairs. Each element is a 2-element array where both values are node identifiers…

Part of ai-and/termgrade-environments.