String Interpolation Library with Edge Case Handling
Design and implement a function interpolate(template, values) similar to JavaScript string interpolation.
Rules:
- Placeholders of the form
${key}are replaced withvalues[key](whitespace ...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
