Apple Array Coding Interview Questions
84 array coding problems are tagged as asked at Apple in interviews and online assessments reported by candidates. By difficulty they split into 26 basic, 46 intermediate and 12 advanced. The topics they most often combine with are Sorting, Hash Table, Sliding Window, Greedy.
Reported questions change over time and are not a guarantee of what you will be asked, so use the list to see which patterns Apple tends to test. For each problem, practise explaining your approach, its time and space cost and the edge cases before you write the code; every problem opens in an editor that runs your code against test cases.
Coding problems
- Two Sum (Basic)
- Contains Duplicate (Basic)
- Best Time to Buy and Sell Stock (Basic)
- Maximum Subarray (Intermediate)
- Product of Array Except Self (Intermediate)
- Move Zeroes (Basic)
- Rotate Array (Intermediate)
- House Robber (Intermediate)
- Coin Change (Intermediate)
- Kth Largest Element (Intermediate)
- Missing Number (Basic)
- Intersection of Two Arrays (Basic)
- Two Sum in a Sorted Array (Basic)
- Minimum Size Subarray Sum (Intermediate)
- Longest Consecutive Sequence (Intermediate)
- Subarray Sum Equals K (Intermediate)
- Container With Most Water (Intermediate)
- Trapping Rain Water (Advanced)
- Sort Colors (Basic)
- Remove Element (Basic)
- Max Consecutive Ones (Basic)
- Find Pivot Index (Basic)
- Largest Rectangle in Histogram (Advanced)
- Search in a Rotated Sorted Array (Advanced)
- Minimum in a Rotated Sorted Array (Intermediate)
- Merge Intervals (Intermediate)
- Insert an Interval (Intermediate)
- Max Chunks to Make Sorted (Advanced)
- Sum of Subarray Minimums (Advanced)
- Subarrays With Product Less Than K (Intermediate)
- Maximum Product of Three (Basic)
- Find K Closest Elements (Intermediate)
- Subarray Sum Equals K (Intermediate)
- Maximum Circular Subarray (Intermediate)
- Best Time to Buy and Sell Stock II (Intermediate)
- House Robber II (Intermediate)
- Gas Station (Intermediate)
- Container With Most Water (Intermediate)
- Top K Frequent Values (Intermediate)
- Is Bipartite (Intermediate)
- Course Schedule Feasible (Intermediate)
- Sum of Subarray Minimums (Advanced)
- LRU Cache Operations (Basic)
- LFU Cache Operations (Intermediate)
- Median of Sliding Windows (Intermediate)
- Sparse Vector Dot Product (Intermediate)
- Maximum Path Quality (Basic)
- Minimum Speed to Arrive on Time (Basic)
- Snapshot Array (Intermediate)
- Hit Counter (Intermediate)
- Course Schedule Order (Intermediate)
- Cheapest Flights Within K Stops (Intermediate)
- Keys and Rooms (Basic)
- Min Stack Operations (Basic)
- Sum of Subarray Ranges (Intermediate)
- Design Circular Queue (Intermediate)
- Moving Average From Data Stream (Basic)
- K Closest Points to Origin (Intermediate)
- Jump Game II (Intermediate)
- Assign Cookies (Basic)
- Interval List Intersections (Intermediate)
- Meeting Rooms (Basic)
- Image Smoother (Basic)
- H-Index (Intermediate)
- 3Sum Triplets (Intermediate)
- Sliding Window Maximum Values (Advanced)
- Maximize Distance to Closest Person (Basic)
- Find First and Last Position (Intermediate)
- Median of Two Sorted Arrays (Advanced)
- Total Hamming Distance (Intermediate)
- Combination Sum (Intermediate)
- Design HashMap (Basic)
- My Calendar I (Intermediate)
- Exam Room (Advanced)
- Memory Allocator (Intermediate)
- Max Points on a Line (Advanced)
- Reverse Pairs (Advanced)
- Walking Robot Simulation (Intermediate)
- Maximum Population Year (Basic)
- Product of the Last K Numbers (Intermediate)
Related
- Apple coding interview questions
- Array problems
- Apple basic problems
- Apple intermediate problems
- Apple advanced problems
- Company interview roadmaps
- All interview guides
Frequently asked questions
How should I use the Apple problem list?
Start with the basic problems, then the intermediate and advanced ones, and note which topics repeat. Solve each under a timer, then read the explanation.
Are these the exact Apple interview questions?
They are problems candidates reported being asked. Companies rotate questions, so use them to learn the patterns, not to predict the exact question.