String
Consolidates two pointers and sliding window in another context; introduces the stack.
Lessons
- ✓01
Recognizing string problems
Strings are arrays of characters: what carries over from Array and what's new in this section.
- ✓02
Pattern 1: Character counting (anagrams)
The frequency signature that identifies and groups strings — anagrams in O(n).
- ✓03
Pattern 2: Sliding Window with frequency
The Array's sliding window, now with a count map as its state.
- ✓04
Pattern 3: Two Pointers and expand from the center
Checking palindromes with two pointers and finding them by growing from the center.
- ✓05
Pattern 4: Stack
The LIFO structure that matches openings and closings and resolves what's “most nested” first.
- ✓06
Pattern 5: Encoding and design
Serialize and deserialize data into a string without ambiguity — the length-prefix pattern.
- ✓07
Synthesis: which pattern to use?
The String section's decision tree and the overall 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.