Pluralsight interview question

Topological graph sorting take-home problem in Node.js