Strings

Strings are sequences of characters and one of the most commonly used data types in programming. Understanding string manipulation, searching, and pattern matching is essential for solving a wide variety of real-world problems.

Key points

  • Immutable in many languages (Java, Python)
  • Common operations: concatenation, substring, search
  • Two pointers technique for palindromes and anagrams
  • Pattern matching with KMP, Rabin-Karp algorithms
  • String building with StringBuilder for efficiency

Problems

Valid Palindrome

Easy

Check if a string is a palindrome ignoring non-alphanumeric characters

Two PointersString Manipulation
Open

Valid Anagram

Coming soon

Determine if two strings are anagrams of each other

Hash MapSorting

Longest Substring Without Repeating

Coming soon

Find length of longest substring without repeating characters

Sliding WindowHash Map

Longest Palindromic Substring

Coming soon

Find the longest palindromic substring in a string

Dynamic ProgrammingExpand Around Center

Group Anagrams

Coming soon

Group strings that are anagrams of each other

Hash MapSorting

Minimum Window Substring

Coming soon

Find minimum window containing all characters of another string

Sliding WindowHash Map