← All sections
Array
The foundation of everything: the patterns here reappear in almost every other section.
0/7 lessons · exam: 0/30%
Lessons
- ✓01
Recognizing array problems
The general method for attacking any array problem and the map of the section's patterns.
- ✓02
Pattern 1: Hash Map
Trading space for time: the question “have I already seen what I'm looking for?” answered in O(1).
- ✓03
Pattern 2: Two Pointers
Two indices that move intelligently to eliminate useless comparisons.
- ✓04
Pattern 3: Sliding Window
Reuse the work from the previous window instead of recomputing from scratch.
- ✓05
Pattern 4: Prefix and Suffix
Precompute running totals to answer any range in O(1).
- ✓06
Pattern 5: Kadane
The local decision that solves the best subarray in a single pass.
- ✓07
Synthesis: which pattern to use?
The section's decision tree and the general quiz before the final exam.
1 easy + 1 medium + 1 hard — unseen problems
With hidden test cases, just like the real LeetCode. This is where you confirm you can leave the section solving any problem of the topic.