Order dependent tasks and find what must rerun
Given tasks and their prerequisites, return any valid order to run them, or detect that the dependencies form a cycle. Then, given a set of tasks that changed, find every task that must rerun because it depends on a changed task directly or indirectly, and return them in a valid order.
No answer yet. Write the first one; the best answer gets endorsed.
