← All companies

Interview prep · Apple

Apple
prep path

Prepare to explain and test array, image and attention code, to design search, grounded-assistant and data systems with explicit guarantees, and to answer project, priority and motivation questions from your own work. Start daily coding and an early search-design mock, then study the stages the mock shows you need.

47 questions · 14 stages

Apple at a glance

Sources
47 questions: 47 from candidate reports.
Practice aids
47 of 47 with a rubric, 47 with staged hints.
Reading
188 links to engineering blogs, papers and docs, 55 published by Apple.
Newest
Question added Nov 3, 2026.

Start here: stage 1, Define the task before choosing a method (3 modules). Then stage 2: 1 question and one peer mock.

1Define the task before choosing a methodStudy, practise and retest · 3 modules · 1 question

Before you pick a model, write the prediction unit, what each output means, the information cutoff, the outcome window, the comparison and the decision rule. Practice by predicting the label status in a worked case and saying which changed assumption would need new evidence.

Study a mechanism, then test a changed case

  1. Decide when a label is known

    Separate the target, the information available for this decision and the status of an outcome that has not finished yet. Practice on the maintenance-system exercise this week.

    Read the focused section

    • Write the task specification and its decision use »

      The lesson names the unit, prediction time, target window, available inputs and population, then separates a parcel-delay score from the review policy that uses it. A high predicted risk does not show that acting on it reduces the risk.

    • Encode one moderation post as three different targets »

      Spam and impersonation on one post encode as [1, 0, 1], review minutes are a number, and low, medium and high priority is ordered without fixed distances. A post with no appeal one day into a seven-day window is pending, not negative.

    Retest after study

    Classify the fault family, fault tags, repair duration and severity as target types. Give the label status of the machine inspected 2 days ago and of the machine with a complete 30-day window and no repeat fault, then explain what replacing repair duration with an over-60-minutes indicator discards.

    Classify the maintenance-system targets and their label status »

    This exercise does not cover which inputs existed at decision time. Practice that next in the availability-cutoff activity.

  2. Apply the availability cutoff

    Build a training row from what was actually known at decision time, not from what a later rebuild of the data happens to contain.

    Read the focused section

    • Build the Monday 09:00 training row »

      Case A is ranked at 09:00, when its message count is 3. The 10:00 escalation and Tuesday’s urgency confirmation cannot be inputs, and with a two-day window the case is ready for outcome evaluation on Wednesday at 09:00.

    Check the specific distinction

    Retest after study

    A case is ranked Friday at 18:00 with a two-day outcome window, a new field arrives Saturday, and only high-ranked cases are reviewed. Write the training row, say whether the Saturday field may enter it, give the outcome status on Saturday, and say what rollback means if v2 breaks its latency limit.

    Rebuild the Friday 18:00 decision row »

    A chronological split alone does not rebuild feature availability. Practice accounting for arrival delays in the rolling-origin activity, where labels arrive two days late.

2Run an early design mock to find what to studyEarly, then after feedback · 3 modules · 1 question

Early on, run the application search design as a timed mock, with a partner if you can or alone with a timer. Frame one ML decision, trace its data and action, and test one failure or changed workload. Afterwards, pick the specific technical or communication mistakes the mock exposed, study those mechanisms and retry each on a new case. Leave topics the mock never reached for their own stages.

Study a mechanism, then test a changed case

  1. Turn mock feedback into one study task

    Agree on the task and the time plan before the mock. Afterwards, write down only the mistakes the mock actually showed, pick one, study its mechanism and retry it on a new case before the next mock. If the mock never reached a topic, leave it untested rather than calling it a weakness.

    Read the focused section

    Check the specific distinction

    Retest after study

    Run the sensor-table exercise with a partner. They read the request with the grouping word replaced by a gap; you ask one targeted question and confirm the output is the latest reading per sensor. Change your plan so a row replaces the saved one only for a strictly later timestamp, and trace the two A rows. Then add A at 10:03 with reading 9 and predict what updates before checking: A moves from 4 to 9 and B stays 8.

    Repair the sensor-table task after a tie-rule hint »

    This exercise covers clarification and hints only; it cannot fix a technical mistake. For a technical miss, use the stage “Fix one specific miss and retry it on a new case”.

3Explain and implement an algorithm every dayPractise daily · 5 modules · 3 questions

Each day, state the output, ordering and error rules, trace a small case, and name the state and its invariant before coding. Then justify correctness and cost under a stated cost model. The linked questions test two distinctions: a filter versus a traversal, and a missing reference versus a healthy node. Change one edge case before you repeat a problem.

Study a mechanism, then test a changed case

  1. Rebuild an algorithm from its invariant every day

    Each practice day, state the contract, the state you keep, the invariant, why each update preserves it, why the loop ends and what it costs. When a test fails, investigate the first counterexample before changing code.

    Read the focused section

    • Derive prefix sums and the shrinking window »

      Prefix sums answer any half-open range sum with two reads, even with negative values. The shortest-window scan relies on nonnegative entries and the pair search relies on sorted input, and the lesson names the quantity that only moves one way in each case.

    • Trace the shortest window with sum at least 5 »

      For [2, 1, 3, 2], P = [0, 2, 3, 6, 8] gives the sum of [1, 3) as 4. The window scan meets the target at lengths 3, 3 and 2, so the best length is 2. Predict each step before reading it.

    Retest after study

    For [4, -2, 3], compute the prefix array and the sum of [1, 3). Explain whether the shortest-window algorithm is still justified with a negative entry, and give the preprocessing cost when the pair search must first sort a copy of its input.

    Test the window proof on [4, -2, 3] »

    The lesson covers scans over one array. The versioned-key and dependency questions need their own invariants, so write those down before coding.

4Check array shapes and numerical state every dayPractise daily · 7 modules · 4 questions

Declare axes, dtypes, tie rules and empty cases first. Predict a small result by hand, compare it with a loop you wrote separately, then change a shape, tie or empty condition and explain the repair.

Study a mechanism, then test a changed case

  1. Check ML shapes and state every practice day

    Each practice day, use a tiny reference you wrote separately to expose a plausible shape, reduction or data-boundary error in vectorized code.

    Read the focused section

    Retest after study

    An implementation returns a scalar for prediction shape (4,) and target shape (4, 1), but the task has one target per example. Write a known-value scalar reference and an invalid-shape test, and explain why duplicating both arrays alone cannot tell paired from all-pairs computation.

    Test a (4,) prediction against a (4, 1) target »

    A correct tiny case checks local arithmetic only. Test tie and numerical behavior separately, for example the exact-tie rule in the lexical-index question.

  2. Trace one k-means assignment and update

    Compute assignments, recomputed centers and the objective by hand before vectorizing, and explain how feature scale changes which points are close.

    Read the focused section

    Retest after study

    For points [1, 3, 9, 11] and centers [1, 9], do one assignment and update and compute both inertias. Explain why four centers with zero inertia need not be better, and compare the label sequences [0, 0, 1, 1] and [1, 1, 0, 0].

    Run one k-means step on [1, 3, 9, 11] »

    A hand trace checks one update on scalar data. Practice the axis, tie and empty-cluster tests a vectorized version needs in the Lloyd’s algorithm question.

5Trace image operations and segmentation shapesStudy, practise and retest · 3 modules · 2 questions

Compute output sizes and border handling before writing a filter, and say whether you are computing cross-correlation or convolution. Trace channel and spatial shapes through an encoder-decoder, and report overlap metrics with their empty-mask rule.

Study a mechanism, then test a changed case

  1. Compute shapes and overlap before debugging

    Predict the output size and parameter count of a convolution, then compute overlap metrics with a declared rule for empty masks.

    Read the focused section

    • Count LeNet’s 28 positions and 156 parameters »

      A 5 by 5 filter on a 32-pixel side gives (32 - 5)/1 + 1 = 28 positions, and six filters have 6 times (25 + 1) = 156 parameters shared across them. A dense head on 9,216 AlexNet features has 37,748,736 weights, so head parameters and convolution arithmetic are separate questions.

    • Compute IoU, Dice and Tversky for TP 3, FP 2, FN 1 »

      IoU is 3/6 = 0.5, Dice is 6/9, and Tversky with alpha 0.3 and beta 0.7 is about 0.698. The weights encode a trade-off, not a recall guarantee.

    • Decide what an empty mask scores »

      An empty reference with an empty prediction makes Dice 0/0, so you must declare the aggregation rule. A high score on a large organ can also hide a missed tiny structure.

    Retest after study

    For TP 4, FP 1 and FN 3, compute IoU, Dice and Tversky with alpha 0.3 and beta 0.7. Write your empty-mask rule and explain why one binary foreground mask may not separate two touching instances.

    Score TP 4, FP 1, FN 3 and state the empty-mask rule »

    These calculations check shape and metric reasoning only. Repairing a real network needs an executed forward pass, loss and backward, which the U-Net question asks for.

6Keep attention axes, masks and training state explicitStudy, practise and retest · 6 modules · 2 questions

Write the query, key and value axes and what each mask value means before you choose an API. Catch a wrong transpose or normalization axis with a non-square case, and keep gradient recording, optimizer updates and streaming state apart.

Study a mechanism, then test a changed case

  1. Check the attention axes and exclusions

    Expose a wrong transpose, a wrong normalization axis or a wrong masking rule, each with its own small counterexample.

    Read the focused section

    • Write the attention reference contract »

      Write the query, key and value axes, which mask value means allowed and the empty-row policy before choosing an API. In the PyTorch version the lesson checked, scaled_dot_product_attention treats True as allowed, while the key_padding_mask of MultiheadAttention uses True for padding.

    • Compare a zero logit with zeroing after softmax »

      With scores [ln 2, ln 3, ln 5], values [1, 4, 100] and the last key forbidden, the correct output is 2.8. Setting the forbidden logit to zero gives 19, and zeroing after softmax gives 1.4 with row mass 0.5.

    • Choose inputs that can reveal the bug »

      Square shapes, identical values or an inactive mask can hide an incorrect operation, and a row-sum test alone cannot catch zero-logit masking.

    Check the specific distinction

    Retest after study

    Repair S = Q @ K.T / sqrt(d); A = softmax(S, axis=-2); A[not allowed] = 0 for batched multi-head tensors. Fix the transpose, the softmax axis and the exclusions, and give one revealing test for each. State the no-allowed-key policy and how an API wrapper handles dropout during evaluation.

    Repair the batched attention pseudocode »

    This lesson does not cover distance-based score priors or cached positions, which need their own position contract. Passing these tests also says nothing about GPU speed.

  2. Trace the gradient buffer and the update

    Keep parameter values, the forward graph and accumulated gradients apart, and match the reduction denominator to the objective you intend.

    Read the focused section

    • Separate graph, gradient buffer and update »

      A fresh forward builds a new graph but does not clear the gradient buffer, backward adds into it, and only an update step changes the parameter. Summing per-batch means weights unequal microbatches equally.

    • Trace weight 2 through two backward passes and a 0.1 step »

      With inputs [1, 3] and targets [1, 5], the buffer reads 4, then 8 without clearing, then 4 again, and the step moves the weight to 1.6. For microbatches of one and two examples, the equal average is 3.5 and the example-weighted one is 4.

    • Retaining the graph does not clear gradients »

      retain_graph=True keeps saved values for another backward pass; it does not replace zero_grad. Accumulating microbatches also does not make BatchNorm see a larger batch.

    Check the specific distinction

    Retest after study

    Start at weight 2 with inputs [1, 2] and targets [0, 2]. Compute the mean squared loss and its derivative, predict the buffer after two fresh backward passes without clearing, then clear it and take one step of size 0.1. For fixed-parameter microbatches of two and six examples with mean-loss derivatives 3 and 7, compare the equal average of batch means with the mean over all eight examples, and state one forward-layer condition for the two to match.

    Trace a gradient buffer, then weight microbatches of 2 and 6 »

    The exercise does not cover streaming updates, where every gradient must use the pre-update state. Practice that in the streaming embedding classifier question.

7Build search from lexical evidence to ranked resultsStudy, practise and retest · 4 modules · 2 questions

Trace tokens to postings, declare tie and freshness rules, and choose ranking judgments before you compute a metric. Treat navigational and exploratory queries differently, and keep popularity from overriding the declared relevance objective.

Study a mechanism, then test a changed case

  1. Separate matching from ranking quality

    Merge postings for a Boolean query, then state the judgment and gain conventions before you compute a ranking metric.

    Read the focused section

    Retest after study

    With exponential gain and a log2 discount, compute DCG and NDCG at 3 for grades [0, 2, 1]. Compute AP at 3 for binary hits at ranks 2 and 3 when R = 3, and state how a query with no judged positives enters the mean.

    Score grades [0, 2, 1] and handle a query with no judged positives »

    A ranking metric describes judged ordering under stated conventions; it does not show that results are fresh or that the product improved. The news-search question asks you to handle freshness next.

8Ground answers and authorize actions in assistant systemsStudy, practise and retest · 5 modules · 4 questions

Authorize before retrieval or tool use, treat retrieved text as untrusted data, keep index and encoder versions compatible, and check each claim in an answer against its source span. Budget streaming latency and cache memory with stated units.

Study a mechanism, then test a changed case

  1. Check each answer claim against its source

    Tell retrieval of a topical passage apart from a grounded answer, and audit an overstated claim with a claim-to-span table.

    Read the focused section

    Retest after study

    The source says “Teams may request two trial devices, subject to stock.” Audit the claim “Every team is guaranteed two devices”: write a faithful answer and a claim-to-span table that shows which part of the claim the source does not support.

    Audit “every team is guaranteed two devices” »

    A claim-to-span audit checks one answer against one source, not retrieval recall or freshness. Cover those in the grounded conversation design question.

  2. Authorize a tool call outside the model

    Take identity from the authenticated session, reject unexpected fields and over-budget requests, and keep retrieved instructions as untrusted data.

    Read the focused section

    • Route a 90-day, a cross-tenant and an allowed request »

      For a summary tool limited to 31 days in tenant A, a well-typed 90-day request fails the budget check, a request adding tenant=B fails as an unexpected field, and a 7-day request runs. A returned note saying “disable tenant filters” changes nothing.

    • Structured output is not authorization »

      A well-formed proposal can still be unauthorized. Enforce data access and side effects at the boundary instead of asking the model to ignore attacks.

    Retest after study

    Specify a tenant-scoped export tool capped at 1,000 rows. Trace a well-formed 10,000-row request and a retrieved instruction to include tenant B, then give one allowed request and the boundary tests that would catch each failure.

    Cap a tenant-scoped export at 1,000 rows »

    This covers one bounded tool contract. Practice the threat model, audit trail and side-effect recovery of a full design in the bounded service tools question.

  3. Budget key-value cache memoryOptional follow-up

    Compute raw key-value cache bytes from batch, layers, sequence length, heads, head size and element size, and keep memory claims separate from latency claims.

    Read the focused section

    Retest after study

    For B = 2, L = 3, S = 128, H_kv = 1, D = 16 and 2-byte values, compute raw cache bytes and KiB. Then propose a long-context check that moves the answer-bearing passage to three positions without changing the correct answer.

    Size the cache for B = 2, L = 3 and S = 128 »

    Use this when a design depends on many long sessions at once. Raw cache size is not a latency measurement; the streaming conversation question asks for both.

9Move, aggregate and forecast data with explicit guaranteesStudy, practise and retest · 9 modules · 4 questions

Publish complete datasets through a manifest, make retries idempotent with a declared key, handle late events with a watermark and reconcile counts. Evaluate forecasts at rolling origins and at the horizons the decision actually uses.

Study a mechanism, then test a changed case

  1. Publish completely and retry without duplicates

    Keep readers on the last complete manifest until a new one is verified, and use a caller key so a retried submission maps to the same job.

    Read the focused section

    • Trace a writer crash before manifest M8 »

      Writer A uploads one part of D8 and crashes. Readers keep using M7, A later publishes M8 only if the pointer is still at generation 40, and writer B’s update under the same condition fails with 412.

    • Map a retried token to job J7 »

      Caller U’s first attempt writes (U, K, P, J7), so a repeat with the same token returns J7 and a changed payload Q returns a mismatch error. A new token K2 with the same payload is a separate job.

    • Bound nested retries »

      A read followed by two writes is not atomic deduplication, and three nested layers of three attempts each can make 27 calls at the deepest layer.

    Retest after study

    Current points to complete M4 at generation 90. Writer X has verified two of M5’s three parts; writer Y verifies M6 and publishes it, getting generation 117. Decide what happens to X’s generation-90 update, list the reader steps and retention conditions, and say what you must check if Y’s commit times out.

    Resolve two writers racing to publish M5 and M6 »

    These mechanisms cover publication and retries only. Practice late events, watermarks and count reconciliation in the auditable event aggregation question.

  2. Evaluate forecasts at rolling origins

    Produce a baseline someone else can replay, then evaluate it at origins and horizons that match the decision, using only labels that had arrived.

    Read the focused section

    Retest after study

    Set origins at days 20, 27 and 34, each predicting the next 7 days, with each label arriving two days after its day ends. List the latest training day at each origin and compute horizon-7 MAE for errors -3, +6 and 0.

    Set three weekly origins with a two-day label delay »

    Backtest error describes only the origins you evaluated. Add lead time, asymmetric costs and prediction intervals in the storage forecast question.

10Integrate capacity, placement and release evidenceStudy, practise and retest · 5 modules

Connect your earlier design choices to load, queueing, failure handling, device or runtime placement and a compatible rollback. Keep service health, matured outcomes and product effects as separate claims. Then retry the weakest decision from your early mock under a changed constraint.

Study a mechanism, then test a changed case

  1. Estimate load with consistent boundaries

    Use mean throughput and mean time inside one boundary, keep bursts and tails separate, and show what happens when arrivals exceed completions.

    Read the focused section

    • Apply Little’s law at 100 requests per second »

      8.64 million requests a day average 100 per second. With a mean time of 0.2 seconds, 20 requests are in flight; with 0.05 seconds of service, 5 are running and 15 are queued. Keeping 2 KB per request for seven days takes 120.96 GB before replication.

    • Keep p95 latency and bursts out of the mean »

      A p95 latency cannot replace the mean time in Little’s law, and arrivals of 120 per second against 100 completions per second grow the backlog by 20 per second.

    Check the specific distinction

    Retest after study

    Estimate mean in-flight work at 250 accepted requests per second and 80 ms mean time. Then work out what happens over one minute when 300 requests per second arrive against 250 per second of completion capacity.

    Size in-flight work at 250 requests per second »

    Capacity arithmetic bounds a stated workload. Measured tails, dependency failures and queue policy need their own evidence, so add a load test to your design answer.

  2. Account for runtime placement and fallbackOptional follow-up

    When part of a model runs on another processor, add transfer and fallback time, and treat export, numerical equivalence and quality as separate gates.

    Read the focused section

    • Add up 14 ms of serial placement time »

      Two 2 ms accelerator stages, a 4 ms CPU fallback and two 3 ms copies total 14 ms, not the 4 ms of accelerator kernels. A model needing IR 11 exceeds the ORT 1.20 row even with opset 21.

    • Loading a model is not equivalence »

      A model can load and pass shape checks while preprocessing swaps RGB for BGR. Loading, numerical equivalence, task quality and speed are separate gates.

    Retest after study

    Serial stages take 3 ms on the accelerator, 1 ms to transfer, 5 ms for a CPU fallback, 1 ms to transfer back and 2 ms on the accelerator. Compute the total time and compare it with a 9 ms all-CPU baseline. Then audit a model with opset 21 and IR 11 against the ORT 1.20 row, and design three reference-output tests.

    Compare a mixed placement with a 9 ms CPU baseline »

    Use this when the role involves on-device or mixed-processor inference. The exercise uses stated timings, so measure on the target hardware before deciding.

11Walk through your own project and codeStudy, practise and retest · 3 modules · 6 questions

Prepare one project you can explain from goal to code: your own contribution, the alternatives, what you measured, what failed and what you would change. Practice answering a deeper question about one component without changing the facts you gave earlier.

Study a mechanism, then test a changed case

  1. Defend the decision with bounded evidence

    Keep the project facts the same while you explain the alternatives, your contribution, the results you measured and the evidence that is missing.

    Read the focused section

    Check the specific distinction

    Retest after study

    Prepare a six-sentence spine, a comparison of two alternatives and three follow-up branches: a changed requirement, a failed assumption and an ownership or evidence limit. Use a failed assumption from your own project if you have one; otherwise present it clearly as a what-if. Then have a partner ask about ownership and keep the same facts.

    Prepare a project spine with three follow-up branches »

    The exercise practices structure, not the code tour. Rehearse the implementation walkthrough question next, using only material you are permitted to share.

12Explain priorities, dependencies and disagreementStudy, practise and retest · 2 modules · 13 questions

Describe each side’s need and constraint, name who decided, separate your actions from team outcomes and say what evidence changed the plan. Practice revising the answer when a deadline, owner or recovery path changes.

Study a mechanism, then test a changed case

  1. Track commitments, owners and a bounded rollout

    Separate accepted commitments from requests, name who can pause a change, and describe evidence that people actually adopted it, not just that it was announced.

    Read the focused section

    • Plan a schema rollout with one willing team »

      Team A accepts a pilot after a sample passes compatibility checks, Team B has no capacity until next month, and the old schema stays available. Team B is not counted as committed just because it got the announcement.

    • A roadmap is not capacity »

      A sent message does not show that people understand or use a new process, so check acceptance and behavior in proportion to the change.

    • Trace a capped launch before a campaign »

      Product wants a change before a campaign and operations asks for rollback and a cap. The engineer telling the story assembles the load check, the owner approves a small cohort, and the later revenue change is not claimed.

    Retest after study

    A model team needs a data export by Thursday, but the producer has not accepted the date and warns the new format may break existing consumers. Write the next coordination steps and a bounded rollout condition.

    Plan around a Thursday export the producer has not accepted »

    The lesson shows structure, not a script. In the interview, tell your own episode, starting with the blocked-dependency question.

13Discuss motivation, growth and the role honestlyStudy, practise and retest · 1 module · 5 questions

Base your motivation on the actual role and your own work, not general praise. Explain work preferences, feedback and growth with specific episodes, and ask questions whose answers could change your decision.

Study a mechanism, then test a changed case

  1. Ask questions that can change a role decision

    Turn your aims into questions about concrete practices, responsibility and recurring work.

    Read the focused section

    Check the specific distinction

    Retest after study

    Compare the two teams in the exercise using two of your own priorities: write one evidence-seeking question for each, classify three practice replies as a reported example, a role-specific commitment or unknown, and make a provisional choice. Then change one fact, such as Team B moving its late meetings, and say whether your choice changes.

    Write two evidence-seeking questions and classify the replies »

    This lesson covers the questions you ask, not how you explain your motivation. Rehearse that with the motivation and next-role questions in this stage.

14Fix one specific miss and retry it on a new caseEarly, then after feedback · 2 modules · 1 question

After a mock, name the criterion you missed and the mistake, and note any help you used. Study the exact mechanism, then explain or implement a new case without the old answer in view. Keep anything still unresolved or untested on your list for the next mock.

Study a mechanism, then test a changed case

  1. Retry the exact criterion you missed

    Name the original criterion you missed, the help you used and what is still uncertain. For a technical miss, go back to its stage, study the mechanism and solve a new case before another short mock. If the miss was communication, use the sensor-table repair exercise.

    Read the focused section

    Check the specific distinction

    Retest after study

    Use this if your original miss was attention axes or masking. After repairing the lesson’s pseudocode, build a causal case with 4 positions, key width 3, value width 5 and distinct values. Change only the value vector at position 3 (counting from 0) and predict which output rows change before you run it: only row 3, because no earlier query may see that key.

    Example only: check a repaired attention function on a new causal case »

    This retest covers attention only. For a ranking-metric or other miss, use the exercise the readings above route you to, and write your prediction before revealing the answer.

    A communication rehearsal cannot close an unrelated technical miss. Write your prediction before you check, with the old answer out of sight.

Next: questions, then a mock.

Practise the Apple questions, run a peer mock on one, then fold every target company into one daily plan.