Given a dependency graph where each node is a async task. A,B can run at the same time. C needs to wait for A and B to be done D needs C to be done Implement executeAsync interface to generate right order
Asked in the first round stage for a Senior Frontend Engineer role at NVIDIA, focusing on JavaScript async coding.
Implement the equivalent Python function execute_async(dependencies). The input is a dictionary mapping each task name to its direct prerequisites. Return a list of execution waves, where tasks in the same wave can run concurrently. Assume the graph is a DAG.
def execute_async(dependencies):