String problems look easy and then quietly eat your interview time. Off-by-one errors, immutable strings, and Unicode surprises all hide in them. These are the patterns that cover most of what you'll be asked.
Anagram checks, "first unique character," and "can you build a ransom note from a magazine" all reduce to counting characters. Use a hash map, or a fixed array of 26 if the input is lowercase letters only. Ask about the character set before choosing.
Palindrome checks and "reverse the vowels" work by moving one pointer from the left and one from the right. For "valid palindrome" variants, skip non-alphanumeric characters and compare case-insensitively.
For the longest palindromic substring, try every center (each character and each gap between characters) and expand outward while the ends match. It's O(n squared) but simple, and interviewers accept it far more often than Manacher's algorithm.
In languages with immutable strings, repeated concatenation in a loop is O(n squared). Collect pieces in a list and join once at the end. Mentioning this unprompted signals real-world experience.
"String to integer" and "validate a number" problems are really about handling states: leading spaces, an optional sign, digits, overflow. Write the states down before coding and the edge cases fall out naturally.
For substring search or repeated-pattern questions, a sliding window over the string with a running count avoids rebuilding substrings at every step.
Pick one problem per pattern and explain it as if the interviewer were in the room. If you want a practice partner that asks follow-ups, Linkjob.ai offers AI mock interviews.
Disclosure: I work on Linkjob AI.