LeetCode
Find And Replace in String
Click
here
for an explanation.