Google onsite newgrad India
Anonymous User
1503

Given a string and a list of offensive words, replace every occurence of the offensive word with word "Google".

String -> I am cloud engineer working at Google. The Cloud stores a lot of data.
Offensive words -> ["cloud", "cloud engineer"]

Output -> I am Google working at Google. The Google stores a lot of data.

Related Question -> Add Bold Tag in String

Comments (7)