Amazon interview question

Code an algorithm that essentially fixes typos