Top 15 Apple Coding Interview Problems, Ranked by Frequency

- LRU Cache (LC 146) is Apple's most-asked problem; own the HashMap + doubly linked list internals, not just the OrderedDict shortcut
- Four linked list problems appear in the top 15 — pointer discipline is a core Apple signal across phone screens and onsites
- Sliding window (LC 3) is Apple's phone screen calibration problem; failing it signals pattern-blindness before you reach the harder rounds
- Kadane's algorithm (LC 53) catches candidates who initialize
max_sum = 0, which fails all-negative arrays - Apple's difficulty skews 57% Medium — expect one medium problem per 45-minute coding round, not a hard
- Eight patterns cover all 15 problems: sliding window, two pointers, Kadane's, greedy, stack, BFS/DFS, backtracking, and heap-based top-k
Apple's interview loops vary by team. Maps leans on graphs. Core OS wants systems intuition. Siri shades probabilistic. But across all of it, the same fifteen problems keep showing up. Like a greatest hits album nobody asked you to memorize, but here we are.
This is that checklist, pulled from Apple's 44-problem LeetCode set, Blind, Glassdoor, and candidate reports from 2024 through 2026. For the full interview format, see the Apple Software Engineer Interview guide.
The Full List at a Glance
| # | Problem | Pattern | Difficulty |
|---|---|---|---|
| 1 | LRU Cache (LC 146) | Design / HashMap + DLL | Medium |
| 2 | Longest Substring Without Repeating Characters (LC 3) | Sliding Window | Medium |
| 3 | Merge Two Sorted Lists (LC 21) | Linked List | Easy |
| 4 | Add Two Numbers (LC 2) | Linked List arithmetic | Medium |
| 5 | Palindrome Linked List (LC 234) | Two Pointers + Reverse | Easy |
| 6 | Maximum Subarray (LC 53) | Kadane's / DP | Medium |
| 7 | Best Time to Buy and Sell Stock (LC 121) | Greedy / Array | Easy |
| 8 | Merge Sorted Array (LC 88) | Two Pointers | Easy |
| 9 | Valid Parentheses (LC 20) | Stack | Easy |
| 10 | Binary Tree Level Order Traversal (LC 102) | BFS | Medium |
| 11 | Sum Root to Leaf Numbers (LC 129) | DFS / Path Accumulation | Medium |
| 12 | Top K Frequent Elements (LC 347) | Heap / Hash Map | Medium |
| 13 | Longest Palindromic Substring (LC 5) | Expand Around Center | Medium |
| 14 | Letter Combinations of a Phone Number (LC 17) | Backtracking | Medium |
| 15 | Minimum Time to Collect All Apples in a Tree (LC 2603) | Tree DFS | Medium |
Difficulty breakdown across Apple's full set: 25% Easy, 57% Medium, 18% Hard. Expect one medium per 45-minute coding round.

The three weeks of prep suddenly feel worth it. Probably.
Apple Coding Interview Problems: What Each One Actually Tests
1. LRU Cache (LC 146): The Design Workhorse
Apple asks this more than any other single problem. It shows up in phone screens, onsite rounds, and as a launching point for follow-up questions about distributed caching. At this point it's less a test and more a ritual. A hazing ceremony with a rubric.
The problem forces you to combine a hash map (O(1) lookup) with a doubly linked list (O(1) recency tracking). Apple interviewers watch for candidates who reach for an OrderedDict shortcut and can't explain the internals. Know the sentinel node trick and why it removes edge cases. See the LRU Cache implementation guide for the full breakdown.
2. Longest Substring Without Repeating Characters (LC 3): Sliding Window Baseline
This is Apple's favorite calibration problem for phone screens. It tells the interviewer in five minutes whether you understand the sliding window pattern or are just dragging a brute-force loop across the array and hoping something interesting happens.
The key insight is that when you find a duplicate, you don't restart from scratch. You shrink the window from the left until the duplicate is gone, then expand right again. A hash map tracks the last index of each character. The whole thing runs in O(n).
Apple follows up with: "What if we care about the minimum window?" That's LC 76, and it's the next step in the same pattern. For more on this, see the sliding window algorithm guide.
3. Merge Two Sorted Lists (LC 21): Pointer Discipline
A simple problem that reveals whether you can manage linked list pointers without bugs.
The interviewer is watching for two things: whether you use a dummy head node, and whether you handle the non-exhausted tail cleanly. Both are pointer hygiene signals. Candidates who manually track the head and fumble through exhaustion cases often introduce bugs on the tail append. Use a dummy, point to l1 or l2 at the end, and move on.
4. Add Two Numbers (LC 2): Carry Propagation
Linked lists storing digits in reverse order, added together. The trap is the carry after both lists are exhausted. Candidates who loop until not l1 and not l2 miss the case where a final carry creates an extra node.
Apple uses this to test whether you can think through numeric edge cases under pressure. Translation: did you actually carry the one?
5. Palindrome Linked List (LC 234): Two-Pass Thinking
You need to check whether a linked list reads the same forwards and backwards. The O(n) space solution is obvious: copy to an array. Apple wants the O(1) space version, which reverses the second half in place and then restores it.
The flow is: find the middle (fast/slow pointers), reverse from the middle forward, compare, reverse back. The restore step is often skipped. Apple interviewers notice. And then they document it in your feedback.
6. Maximum Subarray (LC 53): Kadane's Algorithm
A classic, but Apple asks it because the edge cases separate prepared candidates from lucky ones. The critical mistake is initializing max_sum to 0 instead of nums[0], which fails all-negative arrays.
Kadane's algorithm is three lines of logic: if the running sum goes negative, reset it to the current element, then track the maximum. If you can't produce it cleanly from memory, that's the real edge case.
7. Best Time to Buy and Sell Stock (LC 121): Greedy Clarity
One pass. Track the minimum price seen so far. At each day, check if selling today beats your current best profit. This problem is a greedy algorithm, not dynamic programming, and the interviewer can tell if you don't know the difference. They've seen this confusion before. Many times.
Apple follows up with: "What if you can make unlimited transactions?" That's LC 122, and the answer switches from greedy (single transaction) to summing all positive price deltas. Being ready for this shows you understand why the original solution works, not just what it does.
8. Merge Sorted Array (LC 88): In-Place from the Back
Two sorted arrays, merge them in-place into the first. The catch is that merging from the front overwrites elements you haven't processed yet. Merge from the back, comparing from the ends of each array and placing the larger value at position m+n-1.
This is one of the most common phone screen warmups at Apple. It tests whether you can spot the backward traversal insight without prompting. Reaching for extra space first is the natural instinct. It's also the slower answer, and Apple knows it. That's the point.
9. Valid Parentheses (LC 20): Stack Mechanics
Push opening brackets onto a stack. When you see a closing bracket, pop and check for a match. The tricky case is a closing bracket on an empty stack, which should return false, not throw an exception.
Apple uses this in phone screens to confirm you can implement a stack cleanly and handle boundary conditions without prompting. Throwing an exception is not a passing condition.

The empty stack case. It was there the whole time.
10. Binary Tree Level Order Traversal (LC 102): BFS Wiring
A BFS over a binary tree, collecting nodes level by level. The key is using the queue length at the start of each level to know when that level ends. Candidates who use a delimiter node or flag approach often solve it correctly but show they haven't internalized why the queue length works. Apple uses this as a gateway to zigzag traversal (LC 103) and right side view (LC 199).
11. Sum Root to Leaf Numbers (LC 129): DFS with Accumulation
Each root-to-leaf path represents a number. The task is to sum all such numbers. The insight is to pass the current accumulated number down the recursion as current * 10 + node.val, and add to the total only at leaf nodes.
Apple's LeetCode tag marks this at 91% frequency. The follow-up is almost always path sum variants.
12. Top K Frequent Elements (LC 347): Heap vs Bucket Sort
Get the k most frequent elements from an array. There are two clean solutions: a min-heap of size k (O(n log k)) and bucket sort by frequency (O(n)). Apple asks which one you choose and why. Both are acceptable answers if you can justify them. Bucket sort works because frequencies are bounded by n; the heap generalizes to streaming. See the Top-K Heap pattern guide for the recognition signal.
13. Longest Palindromic Substring (LC 5): Expand Around Center
The O(n^2) solution expands outward from each character and each pair of characters, checking for palindromes. There are two center types: odd-length (expand from one character) and even-length (expand from a gap). Missing even-length centers is the most common bug.
Apple tests this in system and algorithm rounds alike. Manacher's algorithm runs in O(n) but is rarely expected. Be ready to explain why O(n^2) is acceptable here, and don't get rattled if the interviewer asks.
14. Letter Combinations of a Phone Number (LC 17): Backtracking Template
Given digits, generate all possible letter combinations from a phone keypad. Classic backtracking: for each digit, iterate over its possible letters, append to the current path, recurse on the next digit, then remove.
Apple uses this problem to check whether you can articulate the backtracking template: choose, explore, unchoose. The implementation should be clean enough to trace through verbally. If you have to think about what "unchoose" means, that's your homework tonight.
15. Minimum Time to Collect All Apples in a Tree (LC 2603): Yes, That One
This one is on the list because the problem is literally named "apples," and it appears in Apple's problem set with unusual frequency. Coincidence? Probably not. Either way, you need to know it.
A weighted undirected tree. Some nodes have apples. You start at root 0, must collect all apples, and each edge costs 2 (down and back). The answer is the sum of all edge costs on paths to apple-bearing subtrees, counted via DFS.
The key: if a subtree has no apples, skip it. The DFS returns whether its subtree has apples, and the parent accumulates cost only if the child subtree is non-empty. This greedy DFS combination rewards candidates who think before coding.
How to Prep This List
You don't need to memorize 15 solutions. You need to own 8 patterns.
The 15 problems above reduce to: sliding window, linked list pointer manipulation, Kadane's, greedy min-tracking, stack matching, BFS level collection, DFS path accumulation, and heap-based top-k selection. If you can apply each pattern under pressure, you can handle whatever Apple variant lands in your round.
For linked lists, practice until you never need to draw the pointer diagram. That's the baseline Apple expects for medium-tagged list problems. For tree problems, know both BFS and DFS fluently. Apple mixes them in the same round.
LRU Cache is the exception: write it from scratch at least three times until you can produce a working implementation in under 15 minutes. Not three times total. Three times this week. It is the single highest-frequency problem in Apple's loop.
Practice explaining your approach before touching the keyboard. Apple interviewers score communication alongside code. SpaceComplexity runs voice-based mock interviews with rubric feedback on both dimensions at once, which is the closest simulation to what Apple actually tests.
Key Takeaways
- LRU Cache (LC 146) is Apple's most-asked problem. Own it cold.
- Four of the fifteen problems are linked list manipulation. That cluster is not an accident.
- Apple's difficulty skews toward medium. Spend 60% of your prep there.
- For each problem, know the brute-force solution and one optimized version. Apple follow-up questions almost always ask you to improve.
- The letter combinations problem is the backtracking template. Master it once; handle LC 39, 46, and 78 with the same structure.