I have a list of dependencies (or better a DAG without cycles): Input (for example): Item A depends on nothing
I have a list of items that have a partial order relation, i. e, the list can be considered a partially ordered set. I want to sort this list in the same way as in this question. As correctly answered