Microsoft interview question

Implement find and replace.