What is your process for writing testable, maintainable code when faced with tight deadlines?
For the hands-on portion, implement build_execution_order(tasks, dependencies) as a pure function. Return a deterministic ordering that respects every prerequisite, choosing the lexicographically smallest available task at each step. Return an empty array when the dependencies contain a cycle.
Input: an array of unique task strings and an array of dependency pairs [prerequisite, task]. Output: an array containing every task once, or an empty array for cyclic input.
Example 1: tasks = ["test", "code", "review"], dependencies = [["code", "test"], ["test", "review"]] returns ["code", "test", "review"].
Example 2: tasks = ["a", "b"], dependencies = [["a", "b"], ["b", "a"]] returns [].
def build_execution_order(tasks, dependencies):