MongoDB Interview Question

Build order topological sort dfs question