Pergunta de entrevista da empresa Uber

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