Available question text
Given a text string and a set of target words, find and replace all occurrences of those words in the text, treating whitespace as a special character delimiter. The goal is an efficient solution that handles multiple patterns simultaneously — an optimal approach uses a Trie data structure and the Aho-Corasick algorithm for multi-pattern matching.
Related questions
Continue with questions that share topics or the same question type.
- String Template Substitution with Nested Variable Replacement and Cycle Detection
Coding
- 132 Pattern
Coding · Array · Binary Search · Monotonic Stack
- A Graph question, a string question, a couple of array questions.
Coding
- Add Bold Tag in String
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Google
Multi-Pattern String Replacement
Reported Jul 2, 2026 · 1 source report
SENIOR
Source snapshot: Nov 12, 2026
View source