Available question text
Implement a string substitution system that replaces placeholders (formatted as %var% or similar) in a text string with corresponding values from a given mapping. The solution must handle nested substitutions, where replacement values may themselves contain additional placeholders that require further resolution. Use recursive or iterative approaches to fully resolve all substitutions. Additionally, detect and handle cyclic dependencies between replacement keys — if a cycle is detected, return an appropriate error or indication.
Related questions
Continue with questions that share topics or the same question type.
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
String Template Substitution with Nested Variable Replacement and Cycle Detection
Reported Jul 31, 2026 · 4 source reports
MID_LEVEL, SENIOR
Source snapshot: Nov 12, 2026
View source