Skip to content
C Codeloom

Topics / Strings

📝

Strings

String manipulation problems — palindromes, anagrams, pattern matching, and substring tricks.

Why learn Strings?

  • Second-most-common interview topic after arrays.

  • Teaches you to think in characters, indices, and frequencies at once.

  • Patterns transfer directly to bioinformatics, parsers, and search.

What you can build with Strings

Palindrome and anagram problems Substring search and pattern matching Text editors and string-heavy backends

Strings tutorials

7 articles

Hand-written tutorials, ordered as a recommended learning path.

  1. 01 Strings A practical guide to JavaScript strings — template literals, indexing, the essential methods, immutability, and the modern ways to slice, search, and transform text.
  2. 02 Strings A thorough introduction to Python strings — creation, escape sequences, indexing, slicing, the essential methods, f-strings, and why strings are immutable.
  3. 03 Strings — Intro An introduction to strings for data structures and algorithms — immutability, indexing, slicing, common operations, ASCII versus Unicode, and the two-pointer and frequency-counter patterns you will use everywhere.
  4. 04 Pattern Matching A practical tour of substring search — the naive O(n·m) scan, the KMP algorithm with its LPS array, and the Rabin-Karp rolling hash. Worked examples, code, and intuition for when to use each.
  5. 05 Strings — Practice Eight classic string problems with worked Python solutions — Valid Anagram, Group Anagrams, Longest Substring Without Repeating Characters, Longest Palindromic Substring, and more.
  6. 06 LC 72 — Edit Distance LeetCode 72 fully unpacked — the three-operation recurrence, the 2D table, and the rolling-array space optimization that makes interviewers nod.
  7. 07 Longest Palindrome Walk through LeetCode Longest Palindromic Substring using the expand-around-center technique. Compare brute force, DP, and the optimal approach with examples.