Can you write Airflow code?
Asked in the Round 1 stage. Implement execution_order(tasks, dependencies) to validate an Airflow-style DAG. tasks is an array of unique task-name strings. Each dependency is [upstream, downstream]. Return all task names in a valid deterministic execution order, choosing the lexicographically smallest available task first. Return an empty array if dependencies reference an unknown task or contain a cycle.
Examples: tasks = ["extract", "transform", "load"], dependencies = [["extract", "transform"], ["transform", "load"]] returns ["extract", "transform", "load"]. A cyclic dependency returns [].
Constraints: Up to 1,000 tasks and 5,000 dependencies; task names are non-empty.
def execution_order(tasks, dependencies):