In essence it is a variant of the Kahn's algorithm. It has sufficient differences that I feel it deserves a separate explanation. It approaches the problem with node sets in a graph instead of individual nodes. This makes the central idea very simple. See the algorithm outline in the write up.