Pattern · String

String interview questions

468 string problems tagged across recent interview reports. Drilled most heavily by amazon, meta, and google.

Founder's read

String problems make up 468 tagged problems across major tech interviews. Amazon and Meta each drill 138 String variants in their OA pipelines. Google, Bloomberg, and TikTok follow close behind with 115, 114, and 110 respectively. String manipulation isn't a single trick, it's a category spanning substring search, character encoding, parsing, transformation, and state tracking. Most candidates underestimate the breadth until a live OA throws an unfamiliar variant at them. That's where StealthCoder steps in: when a String problem lands during your assessment and you hit a wall, it solves it invisibly in seconds.

Most-asked string problems

#ProblemDiff# Companies
01Basic Calculator IIMEDIUM27
02Basic CalculatorHARD17
03Count and SayMEDIUM14
04Alien DictionaryHARD13
05Backspace String CompareEASY12
06Add BinaryEASY11
07Add StringsEASY10
08Basic Calculator IIIHARD10
09Accounts MergeMEDIUM8
10Compare Version NumbersMEDIUM6
11Break a PalindromeMEDIUM5
12Count Binary SubstringsEASY5
13Binary Tree PathsEASY3
14Brace ExpansionMEDIUM3
15Bulls and CowsMEDIUM3
16Check Whether Two Strings are Almost EquivalentEASY3
17Add Bold Tag in StringMEDIUM2
18Alert Using Same Key-Card Three or More Times in a One Hour PeriodMEDIUM2
19Basic Calculator IVHARD2
20Buddy StringsEASY2
21Check If a Word Occurs As a Prefix of Any Word in a SentenceEASY2
22Check if Number Has Equal Digit Count and Digit ValueEASY2
23Check if the Sentence Is PangramEASY2
24Concatenated WordsHARD2
25Construct Smallest Number From DI StringMEDIUM2
26Construct String With Repeat LimitMEDIUM2
27Additive NumberMEDIUM1
28Apply Bitwise Operations to Make Strings EqualMEDIUM1
29Apply Operations to Make Two Strings EqualMEDIUM1
30Apply SubstitutionsMEDIUM1
31Better Compression of StringMEDIUM1
32Build Binary Expression Tree From Infix ExpressionHARD1
33Calculate Score After Performing InstructionsMEDIUM1
34Camelcase MatchingMEDIUM1
35Can Convert String in K MovesMEDIUM1
36Can Make Palindrome from SubstringMEDIUM1
37Check if a Parentheses String Can Be ValidMEDIUM1
38Check if All Characters Have Equal Number of OccurrencesEASY1
39Check if an Original String Exists Given Two Encoded StringsHARD1
40Check if Binary String Has at Most One Segment of OnesEASY1
41Check if One String Swap Can Make Strings EqualEASY1
42Check if Strings Can be Made Equal With Operations IEASY1
43Check if Strings Can be Made Equal With Operations IIMEDIUM1
44Check If Word Is Valid After SubstitutionsMEDIUM1
45Clear DigitsEASY1
46Consecutive CharactersEASY1
47Construct String with Minimum CostHARD1
48Count AnagramsHARD1
49Count Collisions on a RoadMEDIUM1
50Count Common Words With One OccurrenceEASY1

Showing top 50 of 468 string problems by # companies asking.

The hedge for the live OA

You can't drill every string variant before the assessment. StealthCoder runs invisibly during screen share and solves whichever variant they throw at you. No browser extension. No detection signature. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code.

Get StealthCoder
What this means

String problems split into recognizable families: character-by-character transforms (add-bold-tag-in-string, backspace-string-compare), numeric string ops (add-strings, add-binary), substring matching (alien-dictionary), and stateful scanning (alert-using-same-key-card-three-or-more-times-in-a-one-hour-period). The trap is assuming one approach generalizes. A two-pointer solution for one problem fails on another that needs a stack or hash map. Drill order matters: start with single-pass transforms, then two-pointer edge cases, then state machines. Bloomberg and Goldman Sachs weight these heavily in their OA gatekeeping rounds. StealthCoder is your insurance policy for the String variant you didn't anticipate, it reads the problem on screen and delivers working code before you second-guess your approach.

Companies that hire most on string

The honest play

468 string problems. You won't drill them all. Pass anyway.

String is one of the patterns interviews actually filter on. Memorizing every variant in a week is a fantasy. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds, no matter which string flavor lands in your live OA. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code. Works on HackerRank, CodeSignal, CoderPad, and Karat.

String interview FAQ

How many String problems should I drill before my OA?+

With 468 problems tagged String, sampling is mandatory. Focus on 20-30 problems across the five main families: transforms, numeric ops, substring logic, pattern matching, and state machines. Amazon and Meta combined ask 276 String problems, their patterns are the baseline. Drill until you recognize the family in the problem statement within 30 seconds.

How do I recognize a String problem during my OA?+

You're building, comparing, or extracting from text. Look for character indices, substring bounds, encoding rules, or event timing within strings. If the solution involves pointer movement, stack reversal, or hash lookups on characters, it's String. Problems like add-strings and backspace-string-compare are classic tells.

Which companies weight String problems the most?+

Amazon and Meta each have 138 tagged String problems in their interview pools. Google follows with 115, Bloomberg with 114. TikTok (110), Microsoft (108), and Zoho (106) are also heavy. If you're targeting any of these, String depth is non-negotiable.

What's the most common String pitfall in live OAs?+

Choosing the wrong data structure. Two-pointer works for some; stacks for others; hash maps for character frequency. Many candidates default to one approach and waste 15 minutes on a wrong path. Recognizing the subtype first, transform vs. numeric vs. search, saves you on a timed assessment.

Should I memorize String algorithms or focus on pattern recognition?+

Pattern recognition wins. Memorizing every String trick is impossible with 468 problems. Learn to spot substring problems, numeric string ops, and state machines. Understand two-pointer and stack mechanics deeply. In a live OA, when a String variant you've never seen appears, pattern spotting beats memorization every time.

Problem and frequency data sourced from public community-maintained interview-report repos. Problems and trademarks © LeetCode.