How do I check if a directed graph is acyclic? And how is the algorithm called? I would appreciate a reference.
You can use inversion of finding cycle from my answer here https://stackoverflow.com/a/60196714/1763149
def is_acyclic(graph): return not has_cycle(graph)