Apple coding interview
questions, leaked.
171 problems reported across recent Apple interviews. Top patterns: array, string, hash table. The list below is what most candidates actually saw, plus the honest play if you can't grind all of it.
Apple's interview is a gauntlet of 171 problems, and you're looking at a 62% medium-to-hard split. The company leans hard on arrays (82 problems), strings (47), and hash tables (32). Two Sum, LRU Cache, and Best Time to Buy and Sell Stock will eat up half your prep. If you blank on a sliding-window or two-pointer problem mid-assessment, StealthCoder runs invisibly and surfaces a working solution in seconds. The proctor won't see it. You'll have a concrete answer when you need one most.
Top problems at Apple
| # | Problem | Diff | Frequency | Pass % | Patterns |
|---|---|---|---|---|---|
| 01 | LRU Cache | MEDIUM | 0.0 | 45% | Hash Table · Linked List · Design |
| 02 | Two Sum | EASY | 100.0 | 56% | Array · Hash Table |
| 03 | Best Time to Buy and Sell Stock | EASY | 0.0 | 55% | Array · Dynamic Programming |
| 04 | Top K Frequent Elements | MEDIUM | 0.0 | 65% | Array · Hash Table · Divide and Conquer |
| 05 | Best Time to Buy and Sell Stock II | MEDIUM | 0.0 | 70% | Array · Dynamic Programming · Greedy |
| 06 | Longest Substring Without Repeating Characters | MEDIUM | 78.3 | 37% | Hash Table · String · Sliding Window |
| 07 | Longest Common Prefix | EASY | 77.6 | 45% | String · Trie |
| 08 | Valid Parentheses | EASY | 76.9 | 42% | String · Stack |
| 09 | Median of Two Sorted Arrays | HARD | 75.8 | 44% | Array · Binary Search · Divide and Conquer |
| 10 | Merge Intervals | MEDIUM | 74.2 | 49% | Array · Sorting |
| 11 | Group Anagrams | MEDIUM | 74.2 | 71% | Array · Hash Table · String |
| 12 | Merge Sorted Array | EASY | 73.8 | 53% | Array · Two Pointers · Sorting |
| 13 | Trapping Rain Water | HARD | 73.0 | 65% | Array · Two Pointers · Dynamic Programming |
| 14 | Valid Sudoku | MEDIUM | 71.6 | 62% | Array · Hash Table · Matrix |
| 15 | Reverse Integer | MEDIUM | 71.6 | 30% | Math |
| 16 | Climbing Stairs | EASY | 70.1 | 54% | Math · Dynamic Programming · Memoization |
| 17 | Longest Palindromic Substring | MEDIUM | 68.5 | 36% | Two Pointers · String · Dynamic Programming |
| 18 | Palindrome Number | EASY | 68.0 | 59% | Math |
| 19 | Rotate Image | MEDIUM | 67.4 | 78% | Array · Math · Matrix |
| 20 | Spiral Matrix | MEDIUM | 67.4 | 54% | Array · Matrix · Simulation |
| 21 | 3Sum | MEDIUM | 66.8 | 37% | Array · Two Pointers · Sorting |
| 22 | Add Two Numbers | MEDIUM | 66.8 | 46% | Linked List · Math · Recursion |
| 23 | Roman to Integer | EASY | 66.2 | 65% | Hash Table · Math · String |
| 24 | Best Time to Buy and Sell Stock III | HARD | 0.0 | 51% | Array · Dynamic Programming |
| 25 | Kth Largest Element in an Array | MEDIUM | 0.0 | 68% | Array · Divide and Conquer · Sorting |
| 26 | Number of Islands | MEDIUM | 0.0 | 62% | Array · Depth-First Search · Breadth-First Search |
| 27 | Best Time to Buy and Sell Stock IV | HARD | 0.0 | 47% | Array · Dynamic Programming |
| 28 | Remove Duplicates from Sorted Array | EASY | 65.5 | 60% | Array · Two Pointers |
| 29 | Search in Rotated Sorted Array | MEDIUM | 64.2 | 43% | Array · Binary Search |
| 30 | Maximum Subarray | MEDIUM | 63.5 | 52% | Array · Divide and Conquer · Dynamic Programming |
| 31 | Sqrt(x) | EASY | 63.5 | 40% | Math · Binary Search |
| 32 | Merge Two Sorted Lists | EASY | 62.7 | 67% | Linked List · Recursion |
| 33 | Merge k Sorted Lists | HARD | 61.2 | 57% | Linked List · Divide and Conquer · Heap (Priority Queue) |
| 34 | Generate Parentheses | MEDIUM | 61.2 | 77% | String · Dynamic Programming · Backtracking |
| 35 | Container With Most Water | MEDIUM | 60.4 | 58% | Array · Two Pointers · Greedy |
| 36 | Find the Index of the First Occurrence in a String | EASY | 58.6 | 45% | Two Pointers · String · String Matching |
| 37 | Remove Element | EASY | 56.7 | 60% | Array · Two Pointers |
| 38 | Letter Combinations of a Phone Number | MEDIUM | 55.6 | 64% | Hash Table · String · Backtracking |
| 39 | Search Insert Position | EASY | 55.6 | 49% | Array · Binary Search |
| 40 | Regular Expression Matching | HARD | 53.3 | 29% | String · Dynamic Programming · Recursion |
| 41 | Remove Nth Node From End of List | MEDIUM | 53.3 | 49% | Linked List · Two Pointers |
| 42 | Find First and Last Position of Element in Sorted Array | MEDIUM | 52.1 | 47% | Array · Binary Search |
| 43 | Insert Interval | MEDIUM | 52.1 | 43% | Array |
| 44 | Permutations | MEDIUM | 52.1 | 81% | Array · Backtracking |
| 45 | Add Binary | EASY | 52.1 | 56% | Math · String · Bit Manipulation |
| 46 | Largest Rectangle in Histogram | HARD | 52.1 | 47% | Array · Stack · Monotonic Stack |
| 47 | Maximum Depth of Binary Tree | EASY | 52.1 | 77% | Tree · Depth-First Search · Breadth-First Search |
| 48 | Binary Tree Level Order Traversal | MEDIUM | 52.1 | 71% | Tree · Breadth-First Search · Binary Tree |
| 49 | Next Permutation | MEDIUM | 50.8 | 43% | Array · Two Pointers |
| 50 | Jump Game | MEDIUM | 47.8 | 39% | Array · Dynamic Programming · Greedy |
Frequencies derived from public community-tagged interview reports. Click a row to view on LeetCode.
You have a week, maybe less. You can't out-grind the list above. StealthCoder runs invisibly during the actual Apple OA. The proctor cannot see it. Screen share cannot detect it. Made by a working FAANG engineer who treats the OA the way companies treat hiring: as a game with rules you should know.
Get StealthCoder- array82 · 48%
- string47 · 27%
- hash table32 · 19%
- two pointers30 · 18%
- dynamic programming29 · 17%
- math25 · 15%
- depth first search20 · 12%
- tree19 · 11%
- linked list18 · 11%
- binary tree18 · 11%
Arrays dominate Apple's assessment by a factor of 2x over the next-closest topic. That means you're solving interval problems, stock trades, and trapping rain water repeatedly. Strings come second and almost always pair with hash tables or two-pointers (like Longest Substring Without Repeating Characters). Hash tables are the glue: LRU Cache, Top K Frequent Elements, Group Anagrams. Dynamic programming appears in 29 problems but usually layered on top of array or string work, not standalone. Two-pointers and binary search are lower-frequency but deadly if you miss the pattern. Medium difficulty dominates at 62% of the total. Your week should be spent drilling array patterns first, then hash-table design problems, then the string-sliding-window combo. When you hit something unfamiliar on the live OA, StealthCoder is your hedge.
Companies with similar patterns
If you prepped for Apple, these companies recycle ~60% of the same topics.
You've seen the list.
Now make sure you pass Apple.
Memorizing every problem above in a week is a fantasy. StealthCoder is the hedge: an AI overlay that's invisible during screen share. It reads the problem on screen and surfaces a working solution in under 2 seconds. Made by a working FAANG engineer who treats the OA the way companies treat hiring: as a game with rules you should know. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Apple interview FAQ
How many array problems should I solve before Apple's assessment?+
Apple's list has 82 array problems across all difficulties. Aim for 20-25 solid ones covering intervals, two-pointers, stock trades, and trapping water. That covers the core patterns. The rest is repetition and speed. Focus on medium difficulty since that's 62% of what you'll see.
Is hash-table knowledge enough for Apple?+
Hash tables appear in 32 problems, almost always paired with arrays or strings. Two Sum, LRU Cache, Top K Frequent, Group Anagrams. Don't isolate hash-table drill. Instead, learn hash tables in context: solve array-plus-hash problems together, string-plus-hash problems together. That's how they appear live.
Should I prioritize dynamic programming for Apple?+
Dynamic programming shows up in 29 problems, but it's usually a secondary pattern layered on array or string work (Best Time to Buy and Sell Stock, Trapping Rain Water). Don't lead with DP. Solve arrays and strings first. Once those are solid, DP patterns emerge naturally from the problems themselves.
What hard problems are worth drilling before the assessment?+
Apple's 24 hard problems are concentrated in arrays and strings. Median of Two Sorted Arrays and Trapping Rain Water are the most common. If you have 3-4 days left, drill these two. Skip niche hard problems. You're more likely to see medium difficulty repeated than a hard problem you've never seen.
Is two-pointers a weak spot for Apple candidates?+
Two-pointers appear in 30 problems and often trip up candidates who only know the hash-table shortcut. Merge Sorted Array, Trapping Rain Water, Best Time to Buy and Sell Stock II all reward two-pointer thinking. Drill 5-7 two-pointer array problems explicitly. Know when to use it instead of hash table.