← All topics

Lesson

Strings

Immutable sequences of characters with hashing, windows, and parsing tricks.

Easy → HardTime O(n)Space O(k) alphabet
Practice problems
Loading visualization…

Loading solution…

Core skills

Treat strings as arrays of chars. Learn frequency counting for anagrams, expanding centers for palindromes, and windows for unique substrings.

Lesson path

Valid Anagram → Longest Substring Without Repeating → Longest Palindromic Substring → Group Anagrams → Minimum Window Substring.

Language notes

In Java/C# prefer StringBuilder. In Python slicing is fine but watch quadratic concatenation in loops.

Pitfalls

  • !Unicode assumptions
  • !Case sensitivity
  • !Building strings with + in hot loops

Practice from this topic

Showing 24 of the related problems in the 1000-question bank.

View all →

Got the lesson?

Mark Strings as understood when the ideas stick.