"Section 8: Strings — Easy/Medium"

📚 Vanakkam DSA Course (24 sections) · Hope AI — ML & DS Course

Overview

String manipulation is one of the most common interview topics. This section covers palindromes, anagrams, prefix matching, and character mapping.


Lessons

#Lesson NameDurationNotes
1Reverse String II49m 10s
2Valid Palindrome Approach 124m 12s
3Valid Palindrome Approach 224m 17s
4Largest Odd Number in a String14m 59s
5Longest Common Prefix24m 36s
6Valid Anagram40m 57s
7Isomorphic Strings39m 55s
8Group Anagrams Approach 121m 54s
9Group Anagrams Approach 229m 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):