All 69 problems from Apple's six-month LeetCode list (7 Easy, 53 Medium, 9 Hard), grouped by the pattern that solves them. 67 are solved on this site: open one to see which pattern to choose and why, the approach, the code with a line-by-line explanation, and a player that steps through the code on LeetCode's own example. Easy warm-ups and SQL/JavaScript problems link to LeetCode.
On the pattern pages these problems carry a Apple badge. Frequency is LeetCode's relative score for this list (100 = asked most often). Read a pattern page first, then work through its group here from the most to the least frequent problem.
About 5–6 problems on 5 days a week. Each month: read the pattern page, solve its worked examples without looking, then this list. Re-solve anything you needed a hint for one week later.
| When | Focus | Patterns (problems on the list) | Total |
|---|---|---|---|
| Month 1 | Foundations: arrays you can scan | 01 · Prefix Sum (1) 02 · Two Pointers (6) 03 · Sliding Window (4) 05 · LinkedList In-place Reversal (2) 21 · Array & String Basics (3) | 16 |
| Month 2 | Stacks, heaps, intervals, binary search | 07 · Top 'K' Elements (4) 08 · Overlapping Intervals (2) 09 · Modified Binary Search (4) 17 · Stack (4) | 14 |
| Month 3 | Trees and graphs | 10 · Binary Tree Traversal (3) 11 · Depth-First Search (DFS) on Graphs (5) 12 · Breadth-First Search (BFS) (3) 13 · Matrix Traversal (4) | 15 |
| Month 4 | Search and dynamic programming | 14 · Backtracking (1) 15 · Dynamic Programming Patterns (5) | 6 |
| Month 5 | Hashing, greedy, design, weighted graphs | 16 · Hash Map & Set (5) 18 · Greedy (2) 19 · Trie & Design (7) 20 · Shortest Path & MST (1) | 15 |
| Month 6 | Math, range structures, then mock interviews | 22 · Math & Bit Manipulation (2) | 2 |
In the last two weeks, filter to Hard, sort your attention by frequency, and do timed mock interviews: 45 minutes, talk through the brute force, name the pattern, then code it.
1 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 560 | Subarray Sum Equals K | Medium | 75 | Array, Hash Table, Prefix Sum | Solution · LeetCode ↗ |
5 solved on the pattern page (step-by-step explanation and a step-through player), 1 Easy warm-ups that link to LeetCode.
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 15 | 3Sum | Medium | 70 | Array, Two Pointers, Sorting | Solution · LeetCode ↗ | |
| 125 | Valid Palindrome | Easy | 65 | Two Pointers, String | Solution · LeetCode ↗ | |
| 189 | Rotate Array | Medium | 48 | Array, Math, Two Pointers | Solution · LeetCode ↗ | |
| 5 | Longest Palindromic Substring | Medium | 48 | Two Pointers, String, Dynamic Programming, Manacher | Solution · LeetCode ↗ | |
| 4 | Median of Two Sorted Arrays | Hard | 48 | Array, Binary Search, Divide and Conquer | Solution · LeetCode ↗ | |
| 283 | Move Zeroes | Easy | 48 | Array, Two Pointers | LeetCode ↗ |
4 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 121 | Best Time to Buy and Sell Stock | Easy | 78 | Array, Dynamic Programming | Solution · LeetCode ↗ | |
| 713 | Subarray Product Less Than K | Medium | 75 | Array, Binary Search, Sliding Window, Prefix Sum | Solution · LeetCode ↗ | |
| 3 | Longest Substring Without Repeating Characters | Medium | 65 | Hash Table, String, Sliding Window | Solution · LeetCode ↗ | |
| 567 | Permutation in String | Medium | 48 | Hash Table, Two Pointers, String, Sliding Window | Solution · LeetCode ↗ |
2 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 206 | Reverse Linked List | Easy | 78 | Linked List, Recursion | Solution · LeetCode ↗ | |
| 328 | Odd Even Linked List | Medium | 48 | Linked List | Solution · LeetCode ↗ |
4 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 621 | Task Scheduler | Medium | 65 | Array, Hash Table, Greedy, Sorting, Heap (Priority Queue), Counting | Solution · LeetCode ↗ | |
| 23 | Merge k Sorted Lists | Hard | 58 | Linked List, Divide and Conquer, Heap (Priority Queue), Merge Sort, Tournament Sort | Solution · LeetCode ↗ | |
| 347 | Top K Frequent Elements | Medium | 48 | Array, Hash Table, Divide and Conquer, Sorting, Heap (Priority Queue), Bucket Sort, Counting, Quickselect | Solution · LeetCode ↗ | |
| 295 | Find Median from Data Stream | Hard | 48 | Two Pointers, Design, Sorting, Heap (Priority Queue), Data Stream | Solution · LeetCode ↗ |
2 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 56 | Merge Intervals | Medium | 95 | Array, Sorting, Quicksort | Solution · LeetCode ↗ | |
| 252 | Meeting Rooms Premium | Easy | 58 | Array, Sorting, Quicksort | Solution · LeetCode ↗ |
4 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 981 | Time Based Key-Value Store | Medium | 75 | Hash Table, String, Binary Search, Design | Solution · LeetCode ↗ | |
| 34 | Find First and Last Position of Element in Sorted Array | Medium | 70 | Array, Binary Search | Solution · LeetCode ↗ | |
| 1146 | Snapshot Array | Medium | 58 | Array, Hash Table, Binary Search, Design, Persistent Data Structure | Solution · LeetCode ↗ | |
| 33 | Search in Rotated Sorted Array | Medium | 48 | Array, Binary Search | Solution · LeetCode ↗ |
3 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 428 | Serialize and Deserialize N-ary Tree Premium | Hard | 65 | String, Tree, Depth-First Search, Breadth-First Search | Solution · LeetCode ↗ | |
| 314 | Binary Tree Vertical Order Traversal Premium | Medium | 48 | Hash Table, Tree, Depth-First Search, Breadth-First Search, Sorting, Binary Tree | Solution · LeetCode ↗ | |
| 889 | Construct Binary Tree from Preorder and Postorder Traversal | Medium | 48 | Array, Hash Table, Divide and Conquer, Tree, Binary Tree | Solution · LeetCode ↗ |
5 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 210 | Course Schedule II | Medium | 87 | Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort | Solution · LeetCode ↗ | |
| 207 | Course Schedule | Medium | 58 | Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort, Directed Acyclic Graph | Solution · LeetCode ↗ | |
| 785 | Is Graph Bipartite? | Medium | 58 | Depth-First Search, Breadth-First Search, Union-Find, Graph Theory, Graph Coloring, Bipartite Graph | Solution · LeetCode ↗ | |
| 841 | Keys and Rooms | Medium | 48 | Depth-First Search, Breadth-First Search, Graph Theory | Solution · LeetCode ↗ | |
| 332 | Reconstruct Itinerary | Hard | 48 | Array, String, Depth-First Search, Graph Theory, Sorting, Heap (Priority Queue), Eulerian Circuit, Eulerian Path, Semi-Eulerian Graph | Solution · LeetCode ↗ |
3 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 127 | Word Ladder | Hard | 58 | Hash Table, String, Breadth-First Search, Bidirectional Search | Solution · LeetCode ↗ | |
| 1197 | Minimum Knight Moves Premium | Medium | 48 | Breadth-First Search, Heuristic Search, Bidirectional Search, A* Search | Solution · LeetCode ↗ | |
| 863 | All Nodes Distance K in Binary Tree | Medium | 48 | Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree | Solution · LeetCode ↗ |
4 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 200 | Number of Islands | Medium | 82 | Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix | Solution · LeetCode ↗ | |
| 54 | Spiral Matrix | Medium | 65 | Array, Matrix, Simulation | Solution · LeetCode ↗ | |
| 48 | Rotate Image | Medium | 65 | Array, Math, Matrix | Solution · LeetCode ↗ | |
| 59 | Spiral Matrix II | Medium | 48 | Array, Matrix, Simulation | Solution · LeetCode ↗ |
1 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 17 | Letter Combinations of a Phone Number | Medium | 48 | Hash Table, String, Backtracking | Solution · LeetCode ↗ |
5 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 72 | Edit Distance | Medium | 65 | String, Dynamic Programming | Solution · LeetCode ↗ | |
| 309 | Best Time to Buy and Sell Stock with Cooldown | Medium | 58 | Array, Dynamic Programming | Solution · LeetCode ↗ | |
| 714 | Best Time to Buy and Sell Stock with Transaction Fee | Medium | 48 | Array, Dynamic Programming, Greedy | Solution · LeetCode ↗ | |
| 416 | Partition Equal Subset Sum | Medium | 48 | Array, Dynamic Programming, Knapsack Problem, 0-1 Knapsack | Solution · LeetCode ↗ | |
| 688 | Knight Probability in Chessboard | Medium | 48 | Dynamic Programming | Solution · LeetCode ↗ |
5 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 49 | Group Anagrams | Medium | 84 | Array, Hash Table, String, Sorting | Solution · LeetCode ↗ | |
| 1 | Two Sum | Easy | 75 | Array, Hash Table | Solution · LeetCode ↗ | |
| 2150 | Find All Lonely Numbers in the Array | Medium | 65 | Array, Hash Table, Counting | Solution · LeetCode ↗ | |
| 36 | Valid Sudoku | Medium | 48 | Array, Hash Table, Matrix | Solution · LeetCode ↗ | |
| 128 | Longest Consecutive Sequence | Medium | 48 | Array, Hash Table, Union-Find | Solution · LeetCode ↗ |
4 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 362 | Design Hit Counter Premium | Medium | 92 | Array, Binary Search, Design, Queue, Data Stream | Solution · LeetCode ↗ | |
| 227 | Basic Calculator II | Medium | 75 | Math, String, Stack | Solution · LeetCode ↗ | |
| 736 | Parse Lisp Expression | Hard | 48 | Hash Table, String, Stack, Recursion | Solution · LeetCode ↗ | |
| 678 | Valid Parenthesis String | Medium | 48 | String, Dynamic Programming, Stack, Greedy, Bracket Sequences | Solution · LeetCode ↗ |
2 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 122 | Best Time to Buy and Sell Stock II | Medium | 65 | Array, Dynamic Programming, Greedy | Solution · LeetCode ↗ | |
| 670 | Maximum Swap | Medium | 58 | Math, Greedy | Solution · LeetCode ↗ |
7 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 146 | LRU Cache | Medium | 100 | Hash Table, Linked List, Design, Doubly-Linked List | Solution · LeetCode ↗ | |
| 380 | Insert Delete GetRandom O(1) | Medium | 82 | Array, Hash Table, Math, Design, Randomized | Solution · LeetCode ↗ | |
| 2502 | Design Memory Allocator | Medium | 65 | Array, Hash Table, Design, Simulation | Solution · LeetCode ↗ | |
| 3408 | Design Task Manager | Medium | 58 | Hash Table, Design, Heap (Priority Queue), Ordered Set | Solution · LeetCode ↗ | |
| 208 | Implement Trie (Prefix Tree) | Medium | 48 | Hash Table, String, Design, Trie | Solution · LeetCode ↗ | |
| 635 | Design Log Storage System Premium | Medium | 48 | Hash Table, String, Design, Ordered Set | Solution · LeetCode ↗ | |
| 460 | LFU Cache | Hard | 48 | Hash Table, Linked List, Design, Doubly-Linked List | Solution · LeetCode ↗ |
1 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 787 | Cheapest Flights Within K Stops | Medium | 48 | Dynamic Programming, Depth-First Search, Breadth-First Search, Graph Theory, Heap (Priority Queue), Shortest Path | Solution · LeetCode ↗ |
3 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 14 | Longest Common Prefix | Easy | 75 | Array, String, Trie | Solution · LeetCode ↗ | |
| 151 | Reverse Words in a String | Medium | 48 | Two Pointers, String | Solution · LeetCode ↗ | |
| 68 | Text Justification | Hard | 48 | Array, String, Simulation | Solution · LeetCode ↗ |
2 solved on the pattern page (step-by-step explanation and a step-through player).
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 477 | Total Hamming Distance | Medium | 65 | Array, Math, Bit Manipulation | Solution · LeetCode ↗ | |
| 7 | Reverse Integer | Medium | 58 | Math | Solution · LeetCode ↗ |
Database and JavaScript problems from the list. They aren't Python algorithm problems, so they link straight to LeetCode.
| Done | # | Problem | Level | Frequency | Topics | Links |
|---|---|---|---|---|---|---|
| 2633 | Convert Object to JSON String Premium | Medium | 48 | LeetCode ↗ |