Pluralsight Interview Question

Topological graph sorting take-home problem in Node.js