← All sections

Array

The foundation of everything: the patterns here reappear in almost every other section.

0/7 lessons · exam: 0/30%

Lessons

  1. ✓01

    Recognizing array problems

    The general method for attacking any array problem and the map of the section's patterns.

  2. ✓02

    Pattern 1: Hash Map

    Trading space for time: the question “have I already seen what I'm looking for?” answered in O(1).

  3. ✓03

    Pattern 2: Two Pointers

    Two indices that move intelligently to eliminate useless comparisons.

  4. ✓04

    Pattern 3: Sliding Window

    Reuse the work from the previous window instead of recomputing from scratch.

  5. ✓05

    Pattern 4: Prefix and Suffix

    Precompute running totals to answer any range in O(1).

  6. ✓06

    Pattern 5: Kadane

    The local decision that solves the best subarray in a single pass.

  7. ✓07

    Synthesis: which pattern to use?

    The section's decision tree and the general quiz before the final exam.

🏁 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.