Build systems, data pipelines and agent workflows all need to run tasks after the tasks they depend on. That ordering is a topological sort of a directed acyclic graph.
Implement topo_sort(deps), where deps maps each task to the list of tasks it depends on. Return a list containing every task exactly once, with each task after all its dependencies.
Rules
ValueError.Example
topo_sort({"deploy": ["build", "test"], "test": ["build"], "build": ["install"], "lint": ["install"]})
# ['install', 'build', 'lint', 'test', 'deploy']