AI Interviews · Question

AI-assisted coding round: build a control system that manages aircraft takeoffs and landings. The problem is deliberately ambiguous and product-shaped, so a single prompt can't solve it.

AI-assisted coding question reported at Canva (Jun 2025). Sources, confidence and an answer card.

Researched · updated

eng-092 Both tracks AI-assisted coding rounds AI-assisted coding High confidence
On this page

What they’re really asking

If you only remember one thing, say this in the first minute: “This problem is vague on purpose, so I’ll start without the AI. I’ll ask a few product questions, write the answers down as numbered assumptions, and turn them into three acceptance tests. Then I’ll split the system into a data model, one pure scheduling rule, small event handlers and an output log, and ask the AI for one piece at a time. I’ll review its code for the bugs scheduling code usually has: the boundary of the safety gap, real clock time inside the logic, and requests that wait forever.”

The rest of this page explains each part of that answer, so you can say it with understanding.

Canva’s AI-Assisted Coding round gives you a realistic product problem, such as a control system for aircraft takeoffs and landings at a busy airport, and lets you use your preferred AI tools. That changes what is graded.

In a normal coding interview the problem is precise and you write every line. Here, an AI assistant can write most of the code, so typing is not the test. A coding agent (or AI assistant) is a program built on a large language model, an LLM: a model that reads and writes text. You describe what you want in a prompt, and it writes code. If you paste the whole airport problem into one prompt, you will get something back. You just won’t have decided anything, and the interviewer will see that.

Canva says it designs these problems so a single prompt can’t solve them. Its interviewers look at when you reach for AI, how you break down ambiguous requirements, whether you catch flaws in AI output, and whether the result meets production standards (Canva Engineeringofficial · 11 Jun 2025). So the airport controller is a decomposition test with a coding round attached. Canva published this itself in June 2025, which makes it the clearest official description of the bar.

Clarify first

Canva says successful candidates asked clarifying questions about product requirements. For an airport, ask:

  • What is controlled? Runways only, or also gates and taxiways? Assume runways.
  • Requests: takeoff and landing requests with a time. Can an aircraft cancel or divert?
  • Safety rule: a minimum separation, a gap between two uses of one runway. Assume a fixed gap per runway, as a parameter.
  • Priority: emergencies first, then landings before takeoffs (landing aircraft can’t wait indefinitely), then first come, first served. Ask whether that matches what they want.
  • Closures: a runway can close (weather, maintenance). What happens to its queue?
  • Interface: a library with methods, a command-line tool or an HTTP API? Assume a library plus tests.

Write each answer down as a numbered assumption. That written list is the spec.

Say it like this: “I’ll assume runways only, a fixed gap per runway, and emergencies, then landings, then takeoffs. I’m writing those down as assumptions 1 to 3; tell me if any is wrong.”

Answer

Decompose before prompting, out loud

Events in  (request, cancel, emergency, runway close/open, time passes)
   │
   ▼
Event handlers ── small functions; each updates the state, then asks the core rule
   │
   ▼
Core rule: assign_next(state, now) ── pure function; never breaks separation; orders by priority
   │
   ▼
State ── runways (open?, last used at) + queue of requests
   │
   ▼
Output ── the schedule, plus one audit line per decision ("why this runway, why now")
  1. Model. Runway(id, open, last_used_at), Request(id, kind, aircraft, requested_at, priority) and a decision record (which runway, which slot, why).
  2. Core rule. A pure function, meaning it has no side effects and its output depends only on its inputs: it takes the state, the request queue and the current time, and returns the next assignment. It never assigns a runway inside its separation window and always orders by priority, then request time.
  3. Events. Request, cancel, emergency, runway close and open, and time advancing. Each one is a small handler that updates the state and calls the core rule.
  4. Output. The schedule and an audit line for each decision.

The pure core rule is the design choice to point out. It is the part with the safety logic, and because it is pure, every test of it is just “given this state and this time, expect this assignment”. No mocks, no sleeping.

One worked example

Here is one small scenario to keep in your head and turn into tests. The values are illustrative assumptions: one runway, a gap of 3 minutes.

ClockEventDecisionWhat to say in the interview
10:00Takeoff T1 requestedT1 gets the runway at 10:00”Empty runway, first request wins.”
10:01Landing L1 requestedL1 can go at 10:03 at the earliest”The gap rule holds: no use inside 3 minutes.”
10:02Takeoff T2 requestedT2 queues behind L1”Landings before takeoffs, by assumption 3.”
10:02Emergency E1 declaredE1 takes the 10:03 slot; L1 moves to 10:06”Emergencies jump the queue.”
10:06Time passesL1 lands; T2 is next at 10:09”Is exactly 10:06 allowed, or only after it? That’s the >= question.”

Tests first, then one prompt per piece

Write the first three acceptance tests yourself. Two requests on one runway must be separated by the gap. An emergency jumps the queue. Closing a runway moves its queued requests to another one, or holds them. These tests are your decisions written as code; the AI should not choose them for you.

Then prompt the agent for one piece at a time, with what not to do:

“Write the Runway and Request dataclasses and an assign_next(state, now) function. Priority is emergency, then landing, then takeoff, then request time. Don’t add a CLI. My tests are in test_scheduler.py.”

Review for the bugs scheduling code tends to have

Generated code looks tidy, so review for specific, likely flaws rather than skimming:

  • Off-by-one at the separation boundary. Is the gap >= or >? In the table, can L1 go at exactly 10:06? Decide, and add a test at the exact boundary.
  • Real wall-clock time inside the logic. If assign_next reads the system clock, tests can’t control it and become flaky. Inject a clock: pass now in, as the prompt above does.
  • Starvation. Under constant landings, does a takeoff ever run? In the table, T2 could wait forever if landings keep arriving. Add a test for that and decide on a rule, such as a maximum wait after which a takeoff goes next.

When the interviewer adds a requirement, say which module changes and keep every earlier test. “A runway closure is a new event handler. The core rule doesn’t change, and all the old tests still run.”

Senior vs Staff

Ambiguous product problem

Senior

  • Turns the prompt into written assumptions and three acceptance tests, then builds a clean core rule with an injected clock.

Staff

  • Finds the product decisions hidden in the prompt (starvation, closures, what an audit line must say), asks who owns them, and shapes the modules so the next requirement touches one place.

In plain words: a Senior candidate builds the scheduler cleanly. A Staff candidate notices that “fair” and “safe” are product decisions, asks who decides them, and shapes the code so the next requirement is a small change.

Small-team version

This is the normal shape of a feature at a company of 50–500 people: half-specified, product-facing, built with an agent. The habits carry over directly. Write a one-page spec with numbered assumptions and acceptance examples. Break it into tasks small enough to review in minutes. Keep tests you own, and a pure core that is easy to check. An agent can draft most of the code. Deciding what “fair” or “safe” means stays with you and the product owner.

What the agent costs. Agents are billed per token, a chunk of text of roughly ¾ of a word. Each step of an agent session re-sends the whole conversation so far, so long sessions cost much more than short ones. Prompt caching, where the provider charges much less to re-read text it has just seen, cuts that cost. The family walkthrough’s assumed 40-step session costs about $6.84 without caching and $1.22 with it, and at 10 sessions a day for 22 days that is about $1,500 or $270 a month. That is small next to your time, but bounded only if you bound it: set a spend cap on the agents’ API workspace.

The arithmetic behind the numbers (for a Staff-level follow-up)

Assumed session: 40 steps, 20,000 starting tokens, 3,000 tokens added per step, 800 output tokens per step. Claude Sonnet 5 list prices, fetched 2026-10-11: $2 per 1M input, $0.20 per 1M cached input, $10 per 1M output.

  • Input without caching: 40 × 20,000 + 3,000 × 40 × 41 ÷ 2 = 3,260,000 tokens, $6.52. Output 32,000 tokens, $0.32. Total $6.84.
  • With caching: about 140,000 new input tokens ($0.28) + 3,120,000 cached ($0.62) + output ($0.32) ≈ $1.22.
  • 220 sessions a month: about $1,500 uncached, $270 cached.

Pitfalls

  • Pasting the whole prompt into the AI and building whatever comes back. You skip every decision the round is grading.
  • Real time inside the scheduling logic. Tests become flaky because they can’t control the clock.
  • No starvation test. Landings can block takeoffs forever, and nothing tells you.
  • Skipping the clarifying questions. Canva lists them as a sign of the most successful candidates.
  • No boundary test on the gap. > versus >= is exactly the off-by-one an AI gets plausibly wrong.

Go deeper

Family

Drive a coding agent through a product-shaped build

Agent-assisted rounds at Stripe, Canva, Shopify, Snowflake, OpenAI and Cursor: you own the plan and the tests, the agent types, and you stop a growing spec from quietly changing what earlier rules mean.

Other questions in this family