Amazon Interview Question

Code an algorithm that essentially fixes typos