Pregunta de entrevista de Uber

Identify substrings (of any length) from an array within a larger string, and replace them with their capitalized version