Ramp Interview Question

write a text processing algorithm