Google Phone Interview Question
Anonymous User
6736

Suppose we are creating a string replacement library. Given a map of string replacements, replace the value in the input string

Given map {X=>123, Y=456}
Input: %X%_%Y%
Output: 123_456

Given map {USER=>admin, HOME=>/%USER%/home}
Input: I am %USER% My home is %HOME%
Output: I am admin My home is /admin/home

Comments (25)