"Section 8: Strings — Easy/Medium"
Overview
String manipulation is one of the most common interview topics. This section covers palindromes, anagrams, prefix matching, and character mapping.
Lessons
| # | Lesson Name | Duration | Notes |
|---|---|---|---|
| 1 | Reverse String II | 49m 10s | |
| 2 | Valid Palindrome Approach 1 | 24m 12s | |
| 3 | Valid Palindrome Approach 2 | 24m 17s | |
| 4 | Largest Odd Number in a String | 14m 59s | |
| 5 | Longest Common Prefix | 24m 36s | |
| 6 | Valid Anagram | 40m 57s | |
| 7 | Isomorphic Strings | 39m 55s | |
| 8 | Group Anagrams Approach 1 | 21m 54s | |
| 9 | Group Anagrams Approach 2 | 29m 30s |
Lesson Checklist
- [ ] Reverse String II (49m 10s)
- [ ] Valid Palindrome Approach 1 (24m 12s)
- [ ] Valid Palindrome Approach 2 (24m 17s)
- [ ] Largest Odd Number in a String (14m 59s)
- [ ] Longest Common Prefix (24m 36s)
- [ ] Valid Anagram (40m 57s)
- [ ] Isomorphic Strings (39m 55s)
- [ ] Group Anagrams Approach 1 (21m 54s)
- [ ] Group Anagrams Approach 2 (29m 30s)
My Notes
Add your personal notes, key takeaways, and insights here as you progress through the section.
Key Patterns
- Two pointer — palindrome checks
- Hash map / frequency count — anagram, isomorphic
- Sorting — group anagrams approach 1
- Character array key — group anagrams approach 2
Problem Notes
Valid Palindrome
- Approach 1 (clean string first):
- Approach 2 (two pointers, skip non-alphanumeric):
Valid Anagram
- Use frequency count / sorted string
Isomorphic Strings
- Map chars from s → t and t → s bidirectionally
Group Anagrams
- Approach 1 (sort each word as key):
- Approach 2 (char frequency tuple as key):