The DAG Executor
A hard Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Python
- Difficulty
- hard
- Seniority
- L6
Interview Prompt
Given a task dict mapping task names to {'deps': [dep_names], 'func': lambda_source_string}, topologically order the tasks. For each task, evaluate its lambda by passing a dict {dep_name: result_of_dep} as 'inputs'. Return a dict of task_name -> result. Raise an exception if a cycle exists.
Summary
Wire up a mini pipeline and watch it run.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your python solution with real code execution
- Get instant feedback and a hire/no-hire decision