Apple
Deeply team-specific loops with no standard script — the screen is half résumé interrogation, and the coding half favours “implement this class, then extend it” over puzzles, with a requirement added the moment the first version works. Optimal on the first pass, narration throughout, and the memory bound volunteered on anything involving “millions”.
Typical loop
- 1Recruiter screen — ask which shape the technical screen takes: algorithmic, practical/domain, or design
- 2Hiring-manager call: résumé deep-dive (baseline, instrument, confounder for every number), often with a coding question of its own
- 3Technical phone screen: 45–60 min on CoderPad over WebEx, roughly half résumé and half one problem; some are voice-only design
- 4A second technical screen is normal
- 5Onsite: four to six team-specific rounds — coding, design/OOD, résumé deep-dive, behavioural
- 6Cross-functional round with a partner team
Questions
Callback's practice questions and the LeetCode questions Apple has been asking, filtered together.
Practice questions
System Design · Token bucket, sliding window, and where the counters live.
System Design · The classic: encoding, storage, and redirects at scale.
System Design · Fan-out on write vs. read, ranking, and the celebrity problem.
Sparse Matrix Storage, Addition, and Multiplication
Algorithms & Data Structures · Storage proportional to nonzeros — and the cancellation trap.
Debounce with Cancel and Flush
Frontend · A trailing-edge debounce whose wrapper can also drop the pending call or run it now.
Typeahead with Keyboard Navigation
Frontend · Debounce the query, abort the stale request, cache by query, wrap the arrow keys, wire the combobox.
Algorithms & Data Structures · Pluggable backoff, a retryable filter, hooks, and an abort signal around one loop.
Algorithms & Data Structures · Parse, validate, count — and pick the right denominator for the failure rate.
Memory-Bounded Ranked Ballot Counter
Algorithms & Data Structures · Millions of ballots, Borda scoring, and memory that stays O(candidates) — the constraint is the question.
Algorithms & Data Structures · Bucket sort when the multiset fits, a size-N heap when it's a stream — say both.
Algorithms & Data Structures · "Bidirectional and transitive" means connected components — union-find, keyed by the smallest word.
Algorithms & Data Structures · Flood fill from every unvisited land cell — and know when DFS, BFS or union-find fits.
Algorithms & Data Structures · Three linear phases instead of a re-sort: before, overlapping, after.
Algorithms & Data Structures · Separate chaining with a resize at a load-factor threshold — fixed buckets aren't enough.
Algorithms & Data Structures · A heap cannot update a key — push the new entry and discard stale ones at pop time.
Algorithms & Data Structures · One DFS from the base unit multiplies factors down the tree, modulo a prime.
Nth Node at Level L in a 0/1 Tree
Algorithms & Data Structures · Never build the tree — halve recursively, or read the answer off the parity of popcount(n − 1).
Algorithms & Data Structures · A queue of admitted timestamps per key: evict what aged out, admit while under the limit.
Algorithms & Data Structures · Flatten behind hasNext/next with O(depth) memory — and survive [[], [[]], [[], [3]]].
Algorithms & Data Structures · One pass and O(k) memory: item i replaces a random slot with probability k/(i+1).
Algorithms & Data Structures · Two heaps — a max-heap for the lower half, a min-heap for the upper — rebalanced on every add.
Algorithms & Data Structures · Three guarded divisions — and 0 wherever a denominator is 0.
Algorithms & Data Structures · Map, combine, partition, sort, reduce — the three parts a groupby does not have are the whole grade.
Algorithms & Data Structures · Half-open intervals per room, only neighbours can clash — and check-then-book must be one atomic step.
Algorithms & Data Structures · Idempotent writes, a separate read model, and an audit log — all three in one small service.
Algorithms & Data Structures · One pass with a stack of signed terms; the trap is integer division truncating toward zero.
Algorithms & Data Structures · Build in-order and pull values off a forward-only iterator — no middle-finding, no array copy.
Algorithms & Data Structures · Build the trie first and say why: it prunes the DFS the moment a prefix does not exist.
Algorithms & Data Structures · A group dies exactly when it has no adjacent empty point — flood fill each neighbouring enemy group.
Move 200 TB of Media to GPU Training Hosts
System Design · Do the bandwidth arithmetic out loud, land in object storage, and never let the GPUs read small files.
Design an ML Evaluation Platform
System Design · Versioned benchmarks, cached (model, item) runs, and confidence intervals — presented as a spoken walkthrough.
Algorithms & Data Structures · TCP is a byte stream: buffer across calls, frame by length prefix, and tell a clean EOF from a truncated message.
Implement a Robust REST Create Method
Algorithms & Data Structures · Authenticate, validate, sanitise — then make POST safe to retry with an Idempotency-Key scoped to the caller.
Design Cloud Photo Storage and Multi-Device Sync
System Design · Bytes go straight to object storage; a per-library change feed with sync tokens is the actual product.
Design a Centralized Logging System
System Design · Agents, a durable buffer, tiered storage — and deciding how much to index before the bill decides for you.
Design Cross-Device Wallpaper Synchronization
System Design · A client-side design: apply locally at once, converge eventually, and never let sync touch the main thread.
Design the APIs for an Election Voting System
System Design · One final ballot per voter, results sealed until close — contracts, the one-transaction rule, and a recount path.
Design an Accurate Ad Click Aggregator
System Design · Dedup by impression, event-time windows with watermarks, idempotent sinks — and a batch recount that owns the truth.
System Design · Content-addressed blocks, a per-namespace journal, and conflicted copies instead of silent loss.
Design Disk-Based Inventory Serving
System Design · No SSD, little RAM: count seeks, make writes sequential, and keep the hot counters — not the metadata — in memory.
Scale Digit-Square Convergence Requests
System Design · One pass plus a 1,621-entry table makes compute free — so the design is about avoiding the network, not caching.
Design a Video Sharing Platform
System Design · A transcoding pipeline feeding a CDN: egress is the bill, so codec, ladder and cache strategy are the design.
Design a Marketplace Catalog System
System Design · Category-driven attribute schemas, products versus offers, and a search index that is always rebuildable from the source of truth.
Design and Scale a Yelp-like Reviews Platform
System Design · Geo plus text search over a read-heavy model, with review writes fanned out through queues to aggregates and the index.
Design a Smartwatch Sensor Subsystem
System Design · Heart rate on a moving wrist inside a milliwatt budget: sensor choice, a sensor hub, motion-artifact rejection, and proof it works on everyone.
Migrate a Monolithic Wallet to Microservices
System Design · Strangle the monolith in phases, keep money movement inside one ledger's transaction, and use sagas only around the outside world.
Algorithms & Data Structures · Sort, then sweep — the pattern behind a dozen calendar problems.
Algorithms & Data Structures · Hash map plus doubly linked list, all operations O(1).
Algorithms & Data Structures · One pass, three sets — and derive the box index out loud instead of asserting it.
Algorithms & Data Structures · Two-colour with BFS from every unvisited node; an odd cycle is the only way to fail.
Algorithms & Data Structures · A 26-count key instead of sorting each word — the only decision in the problem.
Algorithms & Data Structures · BFS, not DFS — shortest path — then mention bidirectional BFS, which roughly square-roots the frontier.
Implement Array.prototype.flat
Frontend · Depth, holes and Infinity — without recursion, so 100,000 levels can't overflow the stack.
Frontend · Pre-size the output so holes stay holes, and forward thisArg.
Frontend · Take functions, not promises — then never call the next task until the previous one settles.
Frontend · A sliding window of N workers: results in input order, nothing new after a failure.
Frontend · A promise that settles after a second, rejecting with an Error — then consumed with await and try/catch.
Frontend · Explain the prototype chain, then rebuild a class ... extends pair from constructor functions, without the new Parent() trap.
Frontend · Cycles, shared references, Date, RegExp, Map, Set, prototypes and symbol keys: everything spread and JSON get wrong.
Frontend · A closure over a Map keyed on every argument — and has, not truthiness, so 0 and undefined still hit.
Frontend · Read a nested value by path, and return the fallback only when it is missing, never when it is merely falsy.
Frontend · Step by size and slice — after clamping the size, because 0 loops forever.
Frontend · The dotted path to every primitive in a nested object or array — even when the input has cycles.
Algorithms & Data Structures · The first character whose second occurrence comes earliest — one pass with a set, emoji included.
Unique Values Across Two Arrays I
Algorithms & Data Structures · Every value once, in first-seen order — a Set keeps insertion order.
Algorithms & Data Structures · Prefix products left to right, suffix products right to left — no division, so zeros need no special case.
Algorithms & Data Structures · PUT, GET and a COUNT of everything under a domain: match on the label boundary, then make COUNT fast with a trie.
Algorithms & Data Structures · A second stack holds the minimum at each depth, so getMin is just its top.
Parse an Integer Without parseInt
Algorithms & Data Structures · Sign, then digits through a lookup table, accumulating n * 10 + d — and NaN for anything else.
Frontend · Turn { id, name, parentId } rows into a tree in one pass, then render every level as tabs under its parent.
Frontend · Pack cards of different heights into tight columns with CSS alone, then explain what CSS-only masonry cannot do.
Frontend · A promise around a <link>, memoized by href, that forgets failures so a retry can work.
Multi-Step Form With a Shared Store
Frontend · Three steps, one reducer: data survives Back, each step validates before Next, and submitting locks the form.
Star Rating With Half Stars, at Scale
Frontend · Click to fill, half stars from the click position, a thousand stars, and updates that touch only what changed.
Tic-Tac-Toe: N by N, M in a Row
Frontend · A board of any size, a win check that looks only through the last move, and a status line for turn, winner or draw.
Frontend · Six one-digit fields that feel like one: advance on entry, Backspace back, paste the whole code, lock while verifying.
Image Carousel With One Image Element
Frontend · Previous, next and page buttons that wrap around, any aspect ratio fitted to a fixed frame, and a single <img>.
Predict the Output: Promise and Timer Order
Frontend · A promise resolved inside a timer, two more timers, and a microtask: the event loop decides the order.
Predict the State: A Redux Reducer
Frontend · Trace three dispatches through a reducer by hand — and read the case labels character by character.
Frontend · A function plus the bindings of the scope it was created in — bindings, not snapshots.
Frontend · Capture down, target, bubble up — and why delegation depends on it.
Frontend · Browsers block cross-origin reads unless the server opts in — it protects users, not servers.
Design an Autocomplete Component (Front End)
System Design · A reusable typeahead: the component API, a data layer that debounces, cancels and caches, and the combobox pattern done properly.
Design a Music Streaming Web App (Front End)
System Design · A player that keeps playing across navigation, a queue model, streaming and preloading audio, and state shared across tabs and devices.
Design a Photo Sharing App (Front End)
System Design · An infinite feed of images without layout shift, optimistic likes, and an upload flow that resizes, strips location and survives a bad connection.
Algorithms & Data Structures · Find the end of each run (or each number), emit, jump.
Algorithms & Data Structures · Buckets plus underflow and overflow: O(1) adds, any quantile, error within half a bucket.
Algorithms & Data Structures · Sort by (entity, time), then extend or open one session per entity in a single sweep.
Algorithms & Data Structures · Convert through the base unit — and divide with a modular inverse, since you can't divide mod p.
Algorithms & Data Structures · Store (tokens, last seen) per key and refill lazily on each call — O(1) per key.
Algorithms & Data Structures · Chain iterables behind hasNext/next with a lookahead that skips the empty ones.
Weighted Sampling Without Replacement
Algorithms & Data Structures · A-Res: key each item by random()^(1/weight) and keep the k largest keys.
Stratified Sampling with Largest-Remainder Allocation
Algorithms & Data Structures · Floor each proportional share, give leftovers to the largest remainders, sample within each stratum.
Algorithms & Data Structures · Discount each graded relevance by log2(position + 2), then divide by the ideal ordering's DCG.
Algorithms & Data Structures · Observed agreement corrected for the agreement two annotators would reach by chance.
Algorithms & Data Structures · 1 − C(n − c, k) / C(n, k), computed as a running product so nothing overflows.
Algorithms & Data Structures · Buffer bytes across recv calls, split on newlines, and decode only whole lines.
Frontend · Group items by key into a null-prototype object — because {} already has "constructor".
Algorithms & Data Structures · Where the earliest second occurrence sits — the same set scan, returning an index.
Unique Values Across Two Arrays II
Algorithms & Data Structures · Count every value across both arrays in a Map, then keep the ones counted exactly once.
Unique Values Across Two Arrays III
Algorithms & Data Structures · Objects compare by reference, so deduplicate on a property — the first object with each key wins.
Algorithms & Data Structures · Binary long multiplication: add the doubled multiple for every set bit — and double with +=, not a 32-bit shift.
Implement Array.prototype.filter
Frontend · Skip holes, forward thisArg, and keep the elements whose callback is truthy.
Implement Array.prototype.reduce
Frontend · A missing initial value versus an undefined one — and the TypeError when there's nothing to reduce.
Implement Array.prototype.concat
Frontend · Spread arrays and isConcatSpreadable objects one level, keep holes, append everything else.
Drive a Generator Like async/await
Frontend · Resume the generator with each resolved value, and throw each rejection back in at the yield.
Frontend · Start every call at once and let Promise.all keep the input order.
Frontend · Store results by index, count down, resolve an empty input at once, reject on the first failure.
Frontend · Race the promise against a timer — and clear the timer when the promise wins.
Frontend · Collect arguments until fn.length have arrived — with a fresh array per call so partials stay independent.
Frontend · A called flag, not a check on the result — and the first call's this and arguments.
Algorithms & Data Structures · Each position multiplies its two successors, wrapping around the end with modular indices.
Count Each Character in First-Seen Order
Algorithms & Data Structures · One counting pass into a Map, emitted in insertion order: AAABBAA becomes 5A2B.
Algorithms & Data Structures · A base case at n <= 0 and one recursive call — then say where the call stack runs out.
Algorithms & Data Structures · Binary-search the root in [0, max(1, x)] for a fixed number of rounds — an epsilon loop never ends for large x.
Algorithms & Data Structures · An infinite generator over two BigInts — ordinary numbers lose precision past the 78th term.
A Tooltip Library From data Attributes
Frontend · One tooltip node, delegated listeners, keyboard focus and Escape — in plain DOM, not a component.
Predict the Output: What a Spread Copies
Frontend · { ...first } copies the top level only — a nested object stays shared.
Predict the Output: `this` in an Arrow Method
Frontend · An arrow function takes this from where it is defined — and an object literal is not a scope.
Predict the Output: The Temporal Dead Zone
Frontend · A block-scoped const shadows the outer one from the top of its block — before its line runs.
Predict the Output: A then and finally Chain
Frontend · A promise settles once, finally passes values through, and a rejection handler can recover.
Predict the Output: var Hoisting With Shadowing
Frontend · A var inside the function is hoisted and initialized to undefined, shadowing the outer one.
Predict the Result: Type Coercion
Frontend · What adding "0" to a number does, and a table of +, == and comparison gotchas.
Predict the Output: async/await and the Microtask Queue
Frontend · An async function runs synchronously up to its first await; the rest is a microtask.
Predict the Output: var and let in a Loop With Timers
Frontend · var gives the loop one shared binding; let gives each iteration its own.
Predict the Output: Nested Context Providers
Frontend · Default value, nearest provider, and why memo doesn't stop a context update.
Which Effect Fetches Data Once on Mount?
Frontend · No dependency array loops, an async effect returns a promise, and a fetch in the render body runs every render.
Which Statement About React Context Is Correct?
Frontend · Context in React 16.3 and later: how it's created and who can read it.
What Are the States of a Promise?
Frontend · Pending, then fulfilled or rejected — settled is final, and handlers always run later.
What Were the Best Improvements in ES6?
Frontend · Pick two features and say which bug each one removed.
Frontend · "Is a" ties the child to the parent; "has a" combines small parts.
Frontend · The byte order of multi-byte values — and where JavaScript makes you care.
What Do Object-Oriented Languages Share?
Frontend · Encapsulation, inheritance and polymorphism — and how JavaScript gets inheritance.
Cookies, localStorage or sessionStorage?
Frontend · Size, lifetime and who can read it — HttpOnly cookies survive XSS.
Frontend · HTTPS, CSP, cookie flags and escaping — each named with the attack it stops.
Frontend · fetch resolves on a 500; Axios rejects, parses JSON and intercepts.
Frontend · One round trip and typed data, paid for in caching, query cost and N+1 resolvers.
How Do You Build an npm Package?
Frontend · package.json fields, ESM builds with types, peer dependencies, and a dry-run before publishing.
What Makes a Good Code Review?
Frontend · Correctness first, then readability and tests — small diffs, specific comments.
How Would You Structure a Repo From Scratch?
Frontend · Group by feature, keep tests beside code, and wire checks into CI from the first commit.
Frontend · Name what you test with it — including timers with fake timers.
When Would You Use useMemo or useCallback?
Frontend · They cache a value and a function identity — and only matter when something compares them.
preventDefault or stopPropagation?
Frontend · One cancels the browser's default action; the other stops the event traveling.
Why <!DOCTYPE html>, and What Is Quirks Mode?
Frontend · The doctype selects standards mode; without it, browsers emulate 1990s layout.
Frontend · A GPU texture the compositor can move or fade without layout or paint.
How Do You Make a Page Accessible?
Frontend · Native elements first, then names, keyboard, contrast, motion — and a real example.
How Would You Implement Light and Dark Themes?
Frontend · Custom properties on the root, prefers-color-scheme by default, and no flash of the wrong theme.
How Do You Adjust a Border or a Margin?
Frontend · Content, padding, border, margin — and what border-box changes about width.
How Does the Browser Turn HTML Into Pixels?
Frontend · DOM, CSSOM, render tree, layout, paint, composite — six numbered steps.
Frontend · Which pipeline steps each kind of change re-runs — and how reads force layout.
Frontend · First Contentful Paint and Largest Contentful Paint, with their good thresholds.
How Would You Debug a Blank Page?
Frontend · Console, network, DOM, then bisect the deploys.
How Would You Make a Site Faster?
Frontend · Measure first, then ship less, unblock rendering, cache, and move work.
How Do You Deal With a Slow API?
Frontend · Show a shell at once, cache and parallelize, cancel stale requests — then fix the server.
A Heavy Calculation Freezes the UI
Frontend · Move it to a Web Worker — or chunk it and yield when a worker isn't an option.
Frontend · A leading call, then at most one call per window — with a trailing call that carries the latest arguments.
Asked on LeetCode
298 questions · all time
- LRU CachemediumHash TableLinked ListDesignDoubly-Linked Listfrequency 100.0
- Two SumeasyArrayHash Tablefrequency 86.9
- Merge IntervalsmediumArraySortingQuicksortfrequency 84.5
- Number of IslandsmediumArrayDepth-First SearchBreadth-First SearchUnion-Find+1frequency 84.5
- Best Time to Buy and Sell StockeasyArrayDynamic Programmingfrequency 79.3
- Design Hit CountermediumArrayBinary SearchDesignQueue+1frequency 79.3
- Rotate ArraymediumArrayMathTwo Pointersfrequency 78.2
- Group AnagramsmediumArrayHash TableStringSortingfrequency 77.6
- Top K Frequent ElementsmediumArrayHash TableDivide and ConquerSorting+4frequency 77.0
- Longest Common PrefixeasyArrayStringTriefrequency 76.4
- Reverse Linked ListeasyLinked ListRecursionfrequency 75.8
- Valid SudokumediumArrayHash TableMatrixfrequency 75.8
- Course Schedule IImediumDepth-First SearchBreadth-First SearchGraph TheoryTopological Sortfrequency 73.0
- Course SchedulemediumDepth-First SearchBreadth-First SearchGraph TheoryTopological Sort+1frequency 72.2
- Valid ParentheseseasyStringStackBracket Sequencesfrequency 71.5
- Valid PalindromeeasyTwo PointersStringfrequency 70.6
- Product of Array Except SelfmediumArrayPrefix Sumfrequency 69.8
- Kth Largest Element in an ArraymediumArrayDivide and ConquerSortingHeap (Priority Queue)+1frequency 68.0
- Maximum SubarraymediumArrayDivide and ConquerDynamic Programmingfrequency 68.0
- Reverse Words in a StringmediumTwo PointersStringfrequency 68.0
- Spiral MatrixmediumArrayMatrixSimulationfrequency 68.0
- Time Based Key-Value StoremediumHash TableStringBinary SearchDesignfrequency 68.0
- Longest Substring Without Repeating CharactersmediumHash TableStringSliding Windowfrequency 67.0
- Merge k Sorted ListshardLinked ListDivide and ConquerHeap (Priority Queue)Merge Sort+1frequency 67.0
- Best Time to Buy and Sell Stock IImediumArrayDynamic ProgrammingGreedyfrequency 66.0
- Reverse IntegermediumMathfrequency 66.0
- Rotate ImagemediumArrayMathMatrixfrequency 66.0
- Subarray Product Less Than KmediumArrayBinary SearchSliding WindowPrefix Sumfrequency 64.9
- Find First and Last Position of Element in Sorted ArraymediumArrayBinary Searchfrequency 63.7
- Median of Two Sorted ArrayshardArrayBinary SearchDivide and Conquerfrequency 63.7
- Meeting Rooms IImediumArrayTwo PointersGreedySorting+2frequency 63.7
- Subarray Sum Equals KmediumArrayHash TablePrefix Sumfrequency 63.7
- Trapping Rain WaterhardArrayTwo PointersDynamic ProgrammingStack+1frequency 63.7
- Design Circular QueuemediumArrayLinked ListDesignQueuefrequency 62.5
- Insert Delete GetRandom O(1)mediumArrayHash TableMathDesign+1frequency 62.5
- Lowest Common Ancestor of a Binary TreemediumTreeDepth-First SearchBinary TreeBinary Lifting+1frequency 62.5
- Move ZeroeseasyArrayTwo Pointersfrequency 62.5
- Reverse BitseasyDivide and ConquerBit Manipulationfrequency 62.5
- Merge Two Sorted ListseasyLinked ListRecursionfrequency 61.2
- Snapshot ArraymediumArrayHash TableBinary SearchDesign+1frequency 61.2
- Basic Calculator IImediumMathStringStackfrequency 59.9
- Find Median from Data StreamhardTwo PointersDesignSortingHeap (Priority Queue)+1frequency 59.9
- Min StackmediumStackDesignfrequency 59.9
- Word LadderhardHash TableStringBreadth-First SearchBidirectional Searchfrequency 59.9
- Merge Sorted ArrayeasyArrayTwo PointersSortingfrequency 58.4
- Word BreakmediumArrayHash TableStringDynamic Programming+3frequency 58.4
- 3SummediumArrayTwo PointersSortingfrequency 56.8
- Climbing StairseasyMathDynamic ProgrammingMemoizationfrequency 56.8
- Design Tic-Tac-ToemediumArrayHash TableDesignMatrix+1frequency 56.8
- Search a 2D Matrix IImediumArrayBinary SearchDivide and ConquerMatrixfrequency 56.8